From 7d99cc642a3f64d99a75293597c3eadeafacf09b Mon Sep 17 00:00:00 2001 From: Matthew Rumery Date: Tue, 12 Jul 2022 11:18:45 -0600 Subject: [PATCH] fix: add dataLoaderOptions to gatsby-source-graphql --- packages/gatsby-source-graphql/src/gatsby-node.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/gatsby-source-graphql/src/gatsby-node.js b/packages/gatsby-source-graphql/src/gatsby-node.js index a325f2a2ca9d5..70458637f9eeb 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 (