Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gatsby-source-graphql + ACF fields not showing up

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`,
      },
    },
like image 978
Spencer Bigum Avatar asked Nov 29 '25 20:11

Spencer Bigum


1 Answers

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

like image 154
Spencer Bigum Avatar answered Dec 01 '25 14:12

Spencer Bigum