Files
unicorn-utterances/plugins/count-inline-code/gatsby-node.js
2020-03-14 20:49:08 -07:00

18 lines
483 B
JavaScript

// I would rather have these in their respective plugins folders, but Gatsby
// didn't like having MarkdownRemarkFields implemented twice
exports.createSchemaCustomization = ({ actions }) => {
const { createTypes } = actions;
const typeDefs = `
type MarkdownRemarkFields implements Node {
inlineCount: Int
headingsWithId: [HeadingsWithId]
}
type HeadingsWithId {
value: String!
depth: Int!
slug: String!
}
`;
createTypes(typeDefs);
};