ApolloError: fetch failed

System Information
  • Strapi Version: v4.5.3
  • Operating System: MAC OS
  • Database: –
  • Node Version: 18.12.1
  • NPM Version: 8.19.2
  • Yarn Version: –

I try to fetch Data into my Next app with Graphql and Apollo.

The query itself works fine in the Playground, but when fetching it with my next app i´m getting the following error:

Server Error

ApolloError: fetch failed

This error happened while generating the page. Any console logs will be displayed in the terminal window.

Call Stack
new ApolloError

file:///Users/xxxx/Desktop/Webprojekte/xxxx/frontend/node_modules/@apollo/client/errors/errors.cjs (34:28)

file:///Users/xxxx/Desktop/Webprojekte/xxxxfrontend/node_modules/@apollo/client/core/core.cjs (1697:19)


file:///Users/xxxx/Desktop/Webprojekte/xxxxx/frontend/node_modules/@apollo/client/utilities/utilities.cjs (997:53)

file:///Users/xxxx/Desktop/Webprojekte/xxxx/frontend/node_modules/@apollo/client/utilities/utilities.cjs (990:72)

new Promise

file:///Users/xxxx/Desktop/xxxx/eichborn-consult/frontend/node_modules/@apollo/client/utilities/utilities.cjs (990:24)


file:///Users/xxxx/Desktop/xxxx/eichborn-consult/frontend/node_modules/@apollo/client/utilities/utilities.cjs (998:49)


file:///Users/xxxx/Desktop/Webprojekte/xxxx/frontend/node_modules/zen-observable/lib/Observable.js (140:18)


file:///Users/xxxx/Desktop/Webprojekte/xxxx/frontend/node_modules/zen-observable/lib/Observable.js (179:3)


file:///Users/xxxx/Desktop/Webprojekte/xxxx/frontend/node_modules/zen-observable/lib/Observable.js (240:7)

This is how i fetch the data:

export async function getStaticProps() {

  const client = new ApolloClient({
    uri: "http://localhost:1337/graphql",
    cache: new InMemoryCache()

  const { data } = await client.query({
    query: gql`
    query {
        posts {
          data {
            attributes {

  return {
    props: {
      posts: data.posts.data

Is this supposed to be Post_title or post_title :cake:

sorry went for german here, but changed it now to english :slight_smile: But this wasn´t the reason for the fetching error… :confused:

@webkonditorei any progress on this? I am also facing the same issue.

Sorry for the late delay… Solution was to change the STRAPI URL from “http://localhost:1337” to “