问题
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:
But do not show up when Gatsby runs:
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`,
},
},
回答1:
Looks like all I had to do was delete the .cache directory in Gatsby and rebuild!
来源:https://stackoverflow.com/questions/59545885/gatsby-source-graphql-acf-fields-not-showing-up