{"record":{"id":"eafd5b1fe2b94265","repo":"gatsbyjs/gatsby","slug":"an-empty-string-was-returned-instead-of-a-respon","errorCode":null,"errorMessage":"\n\nAn empty string was returned instead of a response when making a GraphQL request.\nThis may indicate that you have a WordPress filter running which is causing WPGraphQL\nto return an empty string instead of a response.\nPlease open an issue with a reproduction at\nhttps://github.com/gatsbyjs/gatsby/issues/new\nfor more help\n\n${errorContext}\n","messagePattern":"\n\nAn empty string was returned instead of a response when making a GraphQL request\\.\nThis may indicate that you have a WordPress filter running which is causing WPGraphQL\nto return an empty string instead of a response\\.\nPlease open an issue with a reproduction at\nhttps://github\\.com/gatsbyjs/gatsby/issues/new\nfor more help\n\n(.+?)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts","lineNumber":614,"sourceCode":"if ( defined( 'GRAPHQL_REQUEST' ) && true === GRAPHQL_REQUEST ) {\n  return;\n}\\n\\nYou can use the gatsby-source-wordpress debug options to determine which GraphQL request is causing this error.\\nhttps://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-wordpress/docs/plugin-options.md#debuggraphql-object`\n        ),\n      },\n    })\n\n    return\n  }\n\n  const sharedEmptyStringReponseError = `\\n\\nAn empty string was returned instead of a response when making a GraphQL request.\\nThis may indicate that you have a WordPress filter running which is causing WPGraphQL\\nto return an empty string instead of a response.\\nPlease open an issue with a reproduction at\\nhttps://github.com/gatsbyjs/gatsby/issues/new\\nfor more help\\n\\n${errorContext}\\n`\n\n  const emptyStringResponse =\n    e.message === `GraphQL request returned an empty string.`\n\n  if (emptyStringResponse) {\n    reporter.log(``)\n    if (process.env.NODE_ENV === `development`) {\n      reporter.warn(formatLogMessage(sharedEmptyStringReponseError))\n    } else {\n      reporter.panic({\n        id: CODES.BadResponse,\n        context: {\n          sourceMessage: formatLogMessage(sharedEmptyStringReponseError),\n        },\n      })\n\n      return\n    }\n\n    return\n  }\n\n  if (e.message.includes(`self signed certificate`)) {\n    reporter.panic({\n      id: CODES.SelfSignedCert,\n      context: {","sourceCodeStart":596,"sourceCodeEnd":632,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts#L596-L632","documentation":"Error \"\n\nAn empty string was returned instead of a response when making a GraphQL request.\nThis may indicate that you have a WordPress filter running which is causing WPGraphQL\nto return an empty string instead of a response.\nPlease open an issue with a reproduction at\nhttps://github.com/gatsbyjs/gatsby/issues/new\nfor more help\n\n${errorContext}\n\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts:614 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Disable WordPress filters/hooks that intercept GraphQL requests and return early (the docs point at `graphql_request`-style filters returning an empty string)","Use the plugin's debug.graphql option to identify which request returns empty","Check server error logs (PHP fatals can yield an empty body) and raise PHP memory/execution limits","Open a GitHub issue with a reproduction if the cause can't be isolated"],"exampleFix":null,"handlingStrategy":"fallback","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-14T00:17:10.932Z"}