Inside your GraphQL-Markdown + Next.js/Fumadocs project, you'll see the following folders and files:
.
βββ app/
| βββ(home)/
| βββ api/
β βββ assets/
β β βββ index.mdx
β βββ docs/
β β βββ [[...slug]]
β β βββ page.tsx
β βββ globals.css
| βββ layout.config.tsx
| βββ layout.tsx
βββ lib/
β βββ fumadocs-mdx.cjs
β βββ source.ts
βββ next.config.mjs
βββ graphql.config.mjs
βββ postcss.config.mjs
βββ source.config.mjs
βββ package.json
βββ tsconfig.json
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install |
Installs dependencies |
npx gqlmd graphql-to-doc |
Generate documentation from GraphQL schema |
npm run dev |
Starts local dev server at localhost:3000 |
npm run build |
Build your production site to ./dist/ |
npm run start |
Starts local production server at localhost:3000 |
Get your demo up and running with these commands:
npm install
npx gqlmd graphql-to-doc
npm run dev
π§βπ Edit
graphql.config.msj
to try with your own GraphQL schema.
Check out GraphQL-Markdown's docs.