2

I'm wondering why my ACF fields are not showing up in my gatsby app using the gatsby-source-graphql plugin? My ACF fields show up when I use the WP plugin: WP GraphiQL, but not when I run my gatsby app. Can I only import ACF fields using gatsby-source-wordpress??? Everything else seems to show up. I have a custom post type that I'm using no problem, but ACF fields are the issue. Any help would be amazing, Thanks, Spencer

They show up in WP backend: enter image description here

But do not show up when Gatsby runs: enter image description here

Here is whats in my Gatsby config:

{
      resolve: `gatsby-source-graphql`,
      options: {
        // This type will contain remote schema Query type
        typeName: `WPGraphQL`,
        // This is field under which it's accessible
        fieldName: `wpgraphql`,
        // Url to query from
        url: `http://wpgraphql.local/graphql`,
      },
    },
Spencer Bigum
  • 1,811
  • 3
  • 17
  • 28

2 Answers2

8

Looks like all I had to do was delete the .cache directory in Gatsby and rebuild!

Spencer Bigum
  • 1,811
  • 3
  • 17
  • 28
0

To add, I recommend running yarn develop --verbose. In my similar case I noticed on the terminal it output a warning to do with the request being blocked due to a self signed certificate.

CodeUK
  • 421
  • 1
  • 5
  • 13