gatsbyjs/gatsby · error
pluginOptions.schema.queryDepth is not a positive integer.
Error message
pluginOptions.schema.queryDepth is not a positive integer. Using default value in place of provided value.
What it means
The queryDepth-is-not-a-positive-int options processor fires when pluginOptions.schema.queryDepth is not a positive integer (wrong type, zero, or negative). The plugin rejects the value and silently falls back to its default query depth; the warning tells the user their configured value was ignored, so they may see shallower data than intended.
Source
Thrown at packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts:69
helpers.reporter.panic(
formatLogMessage(
`PluginOptions.type.MediaItem.limit is an disallowed plugin option.\nPlease remove the MediaItem.limit option from gatsby-config.js (currently set to ${userPluginOptions?.type?.MediaItem?.limit})\n\nMediaItem nodes are automatically limited to 0 and then fetched only when referenced by other node types. For example as a featured image, in custom fields, or in post_content.`
)
)
},
},
{
name: `queryDepth-is-not-a-positive-int`,
test: ({ userPluginOptions }: IProcessorOptions): boolean =>
typeof userPluginOptions?.schema?.queryDepth !== `undefined` &&
(!isInteger(userPluginOptions?.schema?.queryDepth) ||
userPluginOptions?.schema?.queryDepth <= 0),
processor: ({
helpers,
userPluginOptions,
}: IProcessorOptions): IPluginOptions => {
helpers.reporter.log(``)
helpers.reporter.warn(
formatLogMessage(
`\n\npluginOptions.schema.queryDepth is not a positive integer.\nUsing default value in place of provided value.\n`,
{ useVerboseStyle: true }
)
)
delete userPluginOptions.schema.queryDepth
return userPluginOptions
},
},
{
name: `Require beforeChangeNode type setting functions by absolute or relative path`,
test: ({ userPluginOptions }: IProcessorOptions): boolean =>
!!userPluginOptions?.type,
processor: ({
helpers,
userPluginOptions,View on GitHub (pinned to e85d62f177)
Solutions
- Set schema.queryDepth in gatsby-config.js to a positive integer (e.g. 5 or 10).
- Remove the option entirely to use the plugin default.
- Beware of very large depths — higher values exponentially increase the amount of sourced data.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts:69 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/101e82fb5ca4fef9.
Report an issue: GitHub.