Skip to content

Commit

Permalink
fix(gatsby): Respect infer extension in schema update (#16110)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst authored and sidharthachatterjee committed Jul 30, 2019
1 parent ee703a6 commit ce56b9d
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions packages/gatsby/src/schema/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,20 @@ const rebuildSchemaWithSitePage = async ({
typeConflictReporter,
parentSpan,
}) => {
const typeComposer = addInferredType({
schemaComposer,
typeComposer: schemaComposer.getOTC(`SitePage`),
nodeStore,
typeConflictReporter,
typeMapping,
parentSpan,
})
const typeComposer = schemaComposer.getOTC(`SitePage`)
const shouldInfer =
!typeComposer.hasExtension(`infer`) ||
typeComposer.getExtension(`infer`) !== false
if (shouldInfer) {
addInferredType({
schemaComposer,
typeComposer,
nodeStore,
typeConflictReporter,
typeMapping,
parentSpan,
})
}
await processTypeComposer({
schemaComposer,
typeComposer,
Expand Down

0 comments on commit ce56b9d

Please sign in to comment.