- In an existing Docusaurus project, install the plugin:
- Add the plugin to your
Run the command
npx docusaurus docs:generate:graphql
The command will have generated files that you can now add to your
- You can now run
yarn startto serve your documentation
This option is common to docusaurus plugins and can be used to differentiate multiple instance of the plugin. For example:
With the configuration above you would end up with two different commands:
Can be a path, a glob or an URL used to load your GraphQL schema.
This option can be used to customize the output folder and thus the GraphQL docs' path.
For example if you want the API docs to be served over
/docs/api-reference/ instead of
/docs/api/, you can change this option to
/docs/api-reference/. Note that you can also have more levels to the path, e.g
This option can be used to specify sidebar metadata when using auto-generated sidebar.
The configuration above will create a
_category_.json file in the
routeBasePath looking like this :