gatsby-source-graphql + ACF fields not showing up

佐手、 提交于 2021-01-05 10:26:45

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!