Using Local and Gatsby connection error

Issue Summary

One or two sentence summary of the issue.

When creating a new headless wordpress site with Local and Gatsby for the front end. The gatsby-source-wordpress plugin fails to connect to the local environment. If I use a deployed url such as https://wpgatsbydemo.wpengine.com/graphql it works fine.

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    All new sites using the gatsby-source-wordpress plugin throw this error.

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Yes

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

Create anew local WordPress install.
Add WP Gatsby and WP Graphql plugins.
Create a new Gatsby site. install gatsby-source-wordpress plugin.
Add the localhost url to

When I create a new site using local and Gatsby running gatsby develop thows the error:

 ERROR #gatsby-source-wordpress_111002

     gatsby-source-wordpress  Error: connect ECONNREFUSED 127.0.0.1:10022
        at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)

    GraphQL request to http://localhost:10022/graphql failed.

    Please ensure the following statements are true
      - your WordPress URL is correct in gatsby-config.js
      - your server is responding to requests
      - WPGraphQL and WPGatsby are installed and active in your WordPress backend
      - Your WordPress debug.log does not contain critical errors

    not finished createSchemaCustomization - 0.038s
    not finished  gatsby-source-wordpress  ensuring plugin requirements are met - 0.031s

System Details

Local version 5.10.3

I’m using Windows 10, wsl2

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.