Skip to content

Commit

Permalink
feat(gatsby-transformer-sharp): Add default types for ImageSha… (#15285)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthachatterjee committed Jul 2, 2019
1 parent ce90a8f commit 44580c6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/gatsby-transformer-sharp/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,15 @@ exports.onPreExtractQueries = async ({ store, getNodesByType }) => {
`${program.directory}/.cache/fragments/image-sharp-fragments.js`
)
}

exports.sourceNodes = ({ actions }) => {
const { createTypes } = actions

if (createTypes) {
createTypes(`
type ImageSharp implements Node @infer {
id: ID!
}
`)
}
}

0 comments on commit 44580c6

Please sign in to comment.