gatsbyjs/gatsby · error
${r.errors.join(`, `)}
Error message
${r.errors.join(`, `)} What it means
Thrown by gatsby-plugin-feed's runQuery helper when the GraphQL handler returns a response with a non-empty `errors` array. The helper joins all error strings into one message and throws, aborting feed generation for that query. It is the runtime counterpart to the plugin-options validation: a structurally valid query that the schema rejects at execution time.
Source
Thrown at packages/gatsby-plugin-feed/src/internals.js:4
export const runQuery = (handler, query) =>
handler(query).then(r => {
if (r.errors) {
throw new Error(r.errors.join(`, `))
}
return r.data
})
export const defaultOptions = {
// Override if you want to manually specify the RSS "generator" tag.
generator: `GatsbyJS`,
// Run a default query to gather some information about the site.
query: `
{
site {
siteMetadata {
title
description
siteUrl
site_url: siteUrlView on GitHub (pinned to 8b06340921)
Solutions
- Read the joined error string — it names the failing field/type.
- Run the same query in GraphiQL (`gatsby develop`) to reproduce and see full error locations.
- Align the feed query (or the `setup`/`feeds[].serialize`) with the current schema; rename removed fields.
- If using a custom query, verify every selected field resolves against your sourced nodes.
Example fix
// before: query selects a field that no longer exists
query: `{ allSitePage { totalCount } }`
// after: select an existing field
query: `{ allMarkdownRemark { totalCount } }` Defensive patterns
Strategy: try-catch
Validate before calling
// dry-run the feed query against the schema before onPostBootstrap
const res = await runQuery(graphql, feedQuery)
if (!res) console.warn('feed query returned no data') Type guard
const isErrorsResponse = (r: any): r is { errors: any[] } =>
!!r && Array.isArray(r.errors) && r.errors.length > 0 Try / catch
try {
const data = await runQuery(handler, query)
} catch (e) {
if (/errors/i.test(e.message)) { /* fix schema/query, skip feed */ } else throw e
} Prevention
- Run feed queries in GraphiQL before enabling the plugin.
- Keep feed queries in sync when renaming sourced fields.
- Pin field selections to stable schema fields.
When it happens
Trigger: Calling runQuery(handler, query) where the GraphQL execution returns { errors: [...] } — typically field does not exist, type mismatch, missing resolver, or unauthorized field on the site's schema. Happens during onPostBootstrap when the feed's default or custom query runs against the built schema.
Common situations: Customizing plugin-feed's `query` option to a field that does not exist on the user's schema; removing/renaming a sourced field that the feed query selects; version mismatch where siteAllPage/sitePage fields changed; a typo in a fragment name.
Related errors
- Invalid plugin options for "gatsby-plugin-feed": "quer
- Invalid plugin options for "gatsby-plugin-feed": "qu
- BabelPluginRemoveGraphQLQueries: String interpolations are n
- BabelPluginRemoveGraphQLQueries: Unexpected empty graphql ta
- BabelPluginRemoveGraphQLQueries: GraphQL syntax error in que
AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13).
Data as JSON: /api/errors/5e07baf3c4727ce4.
Report an issue: GitHub.