diff --git a/packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts b/packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts index a33d696b5f851..272dc4f71a335 100644 --- a/packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts +++ b/packages/gatsby-source-wordpress/src/utils/fetch-graphql.ts @@ -745,7 +745,11 @@ const fetchGraphql = async ({ const responsePath = response.request.path - if (path !== responsePath && responsePath !== undefined) { + if ( + path !== responsePath && + responsePath !== undefined && + responsePath !== url + ) { throw new Error(`GraphQL request was redirected to ${responsePath}`) }