Skip to main content

Additional schemas

If you need to support multiple schemas, then you can set multiple projects, each with a different schema.

GraphQL Config​

Define projects with the same id (including default) using GraphQL Config:

.graphqlrc
projects:
default:
schema: "./schema/swapi.graphql"
extensions:
graphql-markdown:
linkRoot: "./docs"
baseURL: "swapi"
homepage: "./docs/swapi.md"
loaders:
GraphQLFileLoader: "@graphql-tools/graphql-file-loader"
admin:
schema: "./schema/admin.graphql"
extensions:
graphql-markdown:
linkRoot: "./docs"
baseURL: "admin"
homepage: "./docs/admin.md"
loaders:
GraphQLFileLoader: "@graphql-tools/graphql-file-loader"

Each additional project gets its own generator command, e.g. npx gqlmd graphql-to-doc:admin.

For a Docusaurus site using plugin instances instead of GraphQL Config, see Docusaurus recipes.