{"record":{"id":"7882fd771c723fa6","repo":"gatsbyjs/gatsby","slug":"invalid-plugin-options-for-gatsby-plugin-feed-7882fd","errorCode":null,"errorMessage":"Invalid plugin options for \"gatsby-plugin-feed\":\n\"query\" must be a valid GraphQL query. Received the error \"${e.message}\"","messagePattern":"Invalid plugin options for \"gatsby-plugin-feed\":\n\"query\" must be a valid GraphQL query\\. Received the error \"(.+?)\"","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/gatsby-plugin-feed/src/plugin-options.js","lineNumber":19,"sourceCode":"import { parse } from \"gatsby/graphql\"\nimport { stripIndent } from \"common-tags\"\n\nconst feed = ({ Joi }) =>\n  Joi.object({\n    output: Joi.string().required(),\n    query: Joi.string().required(),\n    title: Joi.string().required(),\n    serialize: Joi.func().required(),\n    match: Joi.string(),\n    link: Joi.string(),\n  })\n    .unknown(true)\n    .external(({ query }) => {\n      if (query) {\n        try {\n          parse(query)\n        } catch (e) {\n          throw new Error(\n            stripIndent`\n      Invalid plugin options for \"gatsby-plugin-feed\":\n      \"query\" must be a valid GraphQL query. Received the error \"${e.message}\"`\n          )\n        }\n      }\n    })\n\nexport default ({ Joi }) =>\n  Joi.object({\n    generator: Joi.string(),\n    query: Joi.string(),\n    setup: Joi.func(),\n    feeds: Joi.array().items(feed({ Joi })).required(),\n  })\n    .unknown(true)\n    .external(({ query }) => {\n      if (query) {","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-plugin-feed/src/plugin-options.js#L1-L37","documentation":"Plugin options schema for gatsby-plugin-feed: the required 'query' string is run through graphql parse in a Joi external check. A parse failure means the configured feed query is not syntactically valid GraphQL; the underlying parser message is embedded.","triggerScenarios":"Thrown at packages/gatsby-plugin-feed/src/plugin-options.js:19 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the GraphQL syntax in the query option of gatsby-plugin-feed","Validate the query with GraphiQL against your site's schema","Keep the query a static template literal"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}