Exports the current Gatsby schema to a *.graphql
file.
Install
pnpm add gatsby-plugin-schema-export
The generated schema will be written to generated/schema.graphql
.
// gatsby-config.js
...
plugins: [
'gatsby-plugin-schema-export',
...
],
The generated schema will be written to schema/gatsbySchema.graphql
.
// gatsby-config.js
...
plugins: [
{
resolve: `gatsby-plugin-schema-export`,
options: {
dest: `schemas/gatsbySchema.graphql`,
},
},
...
],
The generated schema will be written to generated/schema.graphql
unless the
dest
option is set.