From b8c207218a390e277682606cf4aa5aa2a5856272 Mon Sep 17 00:00:00 2001 From: Matthew Rumery <9679004+that1matt@users.noreply.github.com> Date: Wed, 24 Aug 2022 12:43:15 -0600 Subject: [PATCH] fix(gatsby-source-graphql): add dataLoaderOptions validation to gatsby-source-graphql (#36112) 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 (