diff --git a/packages/gatsby-source-graphql/src/gatsby-node.js b/packages/gatsby-source-graphql/src/gatsby-node.js index a325f2a2ca9d5..8c5aeb3f86c77 100644 --- a/packages/gatsby-source-graphql/src/gatsby-node.js +++ b/packages/gatsby-source-graphql/src/gatsby-node.js @@ -27,6 +27,19 @@ exports.pluginOptionsSchema = ({ Joi }) => createSchema: Joi.function(), batch: Joi.boolean(), transformSchema: Joi.function(), + dataLoaderOptions: Joi.object({ + batch: Joi.boolean(), + maxBatchSize: Joi.number(), + batchScheduleFn: Joi.function(), + cache: Joi.boolean(), + cacheKeyFn: Joi.function(), + cacheMap: Joi.object({ + get: Joi.function(), + set: Joi.function(), + delete: Joi.function(), + clear: Joi.function(), + }), + }) }).or(`url`, `createLink`) exports.createSchemaCustomization = async ( @@ -101,17 +114,17 @@ exports.createSchemaCustomization = async ( const schema = transformSchema ? transformSchema({ - schema: introspectionSchema, - link, - resolver, - defaultTransforms, - options, - }) + schema: introspectionSchema, + link, + resolver, + defaultTransforms, + options, + }) : wrapSchema({ - schema: introspectionSchema, - executor: linkToExecutor(link), - transforms: defaultTransforms, - }) + schema: introspectionSchema, + executor: linkToExecutor(link), + transforms: defaultTransforms, + }) addThirdPartySchema({ schema }) }