Skip to content

Commit

Permalink
fix(gatsby-source-graphql): add dataLoaderOptions validation to gatsb…
Browse files Browse the repository at this point in the history
…y-source-graphql (#36112)

fix: add dataLoaderOptions to gatsby-source-graphql
  • Loading branch information
that1matt committed Aug 24, 2022
1 parent b45debc commit b8c2072
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/gatsby-source-graphql/src/gatsby-node.js
Expand Up @@ -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 (
Expand Down

0 comments on commit b8c2072

Please sign in to comment.