gatsby-source-graphql + ACF字段未显示

问题描述 投票:0回答:1

我想知道为什么我的ACF字段没有使用gatsby-source-graphql插件显示在我的gatsby应用程序中?当我使用WP插件WP GraphiQL时,会显示我的ACF字段,但是当我运行gatsby应用程序时却不会显示。我只能使用gatsby-source-wordpress导入ACF字段吗???其他一切似乎都出现了。我使用的自定义帖子类型没有问题,但是ACF字段是问题所在。任何帮助都将是惊人的,谢谢,斯宾塞

它们显示在WP后端中:enter image description here

但是当盖茨比运行时不会出现:enter image description here

这是我的盖茨比配置中的内容:

{
      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`,
      },
    },
wordpress graphql advanced-custom-fields gatsby wp-graphql
1个回答
0
投票

看起来我要做的就是删除Gatsby中的.cache目录并重建!

© www.soinside.com 2019 - 2024. All rights reserved.