Skip to content

Commit b8c2072

Browse files
authored
fix(gatsby-source-graphql): add dataLoaderOptions validation to gatsby-source-graphql (#36112)
fix: add dataLoaderOptions to gatsby-source-graphql
1 parent b45debc commit b8c2072

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/gatsby-source-graphql/src/gatsby-node.js

+13
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ exports.pluginOptionsSchema = ({ Joi }) =>
2727
createSchema: Joi.function(),
2828
batch: Joi.boolean(),
2929
transformSchema: Joi.function(),
30+
dataLoaderOptions: Joi.object({
31+
batch: Joi.boolean(),
32+
maxBatchSize: Joi.number(),
33+
batchScheduleFn: Joi.function(),
34+
cache: Joi.boolean(),
35+
cacheKeyFn: Joi.function(),
36+
cacheMap: Joi.object({
37+
get: Joi.function(),
38+
set: Joi.function(),
39+
delete: Joi.function(),
40+
clear: Joi.function(),
41+
}),
42+
}),
3043
}).or(`url`, `createLink`)
3144

3245
exports.createSchemaCustomization = async (

0 commit comments

Comments
 (0)