Skip to content

[gatsby-source-wordpress] GraphQL Error Unknown type "acf_post_photo" #5049

@williharder

Description

@williharder

When I run gatsby develop I get a GraphQL error regarding the ACF fields and on the frontend I get an error message.

bildschirmfoto 2018-04-19 um 20 12 57

The shown error message in the terminal console reads
GraphQL Error Unknown type "acf_post_photo".

I started a Gatsby App & WordPress Site from scratch and copied carefully the everything in order. I also changed the acf field names in the backend and in templates/post.js

bildschirmfoto 2018-04-19 um 20 01 22

When I delete all code respective to ACF from templates/post.js the app builds just fine and all regular wordpress content is shown.

The curios thing is, that when I run a query from GraphiQL it successfully pulls all the acf fields and content.

bildschirmfoto 2018-04-19 um 20 20 55
bildschirmfoto 2018-04-19 um 20 21 32

These are all my plugins in WordPress

bildschirmfoto 2018-04-19 um 19 51 10

This is my edited code from templates/post.js

There were already several similar issues, though none brought a solution. Hopefully somebody can help? (Sorry about not keeping it short 🌚)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions