gatsby-theme-schema-extensions
v1.0.1
Published
A Gatsby theme to add additional extensions to the GraphQL SDL.
Downloads
2
Maintainers
Readme
gatsby-theme-schema-extensions
About
A simple plugin that adds new schema extensions to Gatsby's GraphQL SDL.
Getting Started
Add this theme to your theme using:
npm install gatsby-theme-schema-extensions
or
yarn add gatsby-theme-schema-extensions
Next add the theme to your gatsby-config.js
.
module.exports = {
plugins:['gatsby-theme-schema-extensions'],
}
You can now use the extensions during your schema custimizations in gatsby-node.js
.
Example using a parent node's body resolver:
exports.createSchemaCustomization = ({ actions }) => {
createTypes(`type MdxCustom implements Node & Custom {
id: ID!
body: String @parent(from:"body")
}`);
}