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.