Headless CMS (Next.js) - Fetch Failed

What issue or error are you experiencing?

I am experiencing a fetch failed error when I am attempting to fetch grapql from a local wp website.

The failure occurs when I try to fetch using a server component from Next.js, but when I use a client component, it fetches properly on a local WP.

But if I fetch from a live WP website, the fetch works on a server component.

I have also used the Atlas plugin with the same exact result.

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

Follow this guide: Next.js 13 and WPGraphQL in headless WordPress - Builders


System Details

  • Local Version:

  • Operating System (OS) and OS version:
    Windows 11 - Local By Flywheel
    WSL2 Ubuntu - Next.js


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @sgfanega

Could you share your full Local Log so that we can take a look in there to see if anything stands out?

Retrieving Local’s Log File

Have you been able to use this workflow successfully in the past or was this your first attempt? Just for clarification if there was a certain point where things stopped working.