gatsbyjs/gatsby · error
There are conflicting field types in your data. If you have
Error message
There are conflicting field types in your data. If you have explicitly defined a type for those fields, you can safely ignore this warning message. Otherwise, Gatsby will omit those fields from the GraphQL schema. If you know all field types in advance, the best strategy is to explicitly define them with the `createTypes` action, and skip inference with the `@dontInfer` directive. See https://www.gatsbyjs.com/docs/actions/#createTypes
What it means
Error "There are conflicting field types in your data. If you have explicitly defined a type for those fields, you can safely ignore this warning message. Otherwise, Gatsby will omit those fields from the GraphQL schema. If you know all field types in advance, the best strategy is to explicitly define them with the `createTypes` action, and skip inference with the `@dontInfer` directive. See https://www.gatsbyjs.com/docs/actions/#createTypes" thrown in gatsbyjs/gatsby.
Source
Thrown at packages/gatsby/src/schema/infer/type-conflict-reporter.ts:130
}
addConflict(selector: string, examples: Array<ITypeConflictExample>): void {
if (selector.substring(0, 11) === `SitePlugin.`) {
// Don't store and print out type conflicts in plugins.
// This is out of user control so he/she can't do anything
// to hide those.
return
}
const entry = this.getEntryFromSelector(selector)
examples
.filter(example => example.value != null)
.forEach(example => entry.addExample(example))
}
printConflicts(): void {
if (this.entries.size > 0) {
report.warn(
`There are conflicting field types in your data.\n\n` +
`If you have explicitly defined a type for those fields, you can ` +
`safely ignore this warning message.\n` +
`Otherwise, Gatsby will omit those fields from the GraphQL schema.\n\n` +
`If you know all field types in advance, the best strategy is to ` +
`explicitly define them with the \`createTypes\` action, and skip ` +
`inference with the \`@dontInfer\` directive.\n` +
`See https://www.gatsbyjs.com/docs/actions/#createTypes`
)
this.entries.forEach(entry => entry.printEntry())
}
}
getConflicts(): Array<TypeConflictEntry> {
return Array.from(this.entries.values())
}
}
View on GitHub (pinned to e85d62f177)
Solutions
- Explicitly define the conflicting field types with the createTypes action so no inference is needed
- Skip inference entirely on affected types using the `@dontInfer` directive
- Inspect the reported selector and examples to find the fields receiving mixed types (e.g. string vs number) and normalize the source data
- Note: conflicts from SitePlugin.* types are ignored by Gatsby and cannot be suppressed further
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/gatsby/src/schema/infer/type-conflict-reporter.ts:130 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26).
Data as JSON: /api/errors/dcd3c5838363c526.
Report an issue: GitHub.