How do I find acf data in the GraphQL IDE? #2903
Replies: 2 comments
-
Not sure if you are having trouble with custom post types or Advanced Custom Fields. If it's the former, have you tried adding register_graphql_field to your graphql_register_types function. Something like this for a custom field:
|
Beta Was this translation helpful? Give feedback.
-
@bobdobbs have you tried the new version of WPGraphQL for ACF? We re-architected the plugin and it's now available on WordPress.org: https://wordpress.org/plugins/wpgraphql-acf And it has a new home on Github: https://github.com/wp-graphql/wpgraphql-acf The new version of the plugins supports the ACF Post Types and Taxonomies features released on ACF v6.1 providing a UI to set the post type / taxonomy to "show in graphql" For Post Types / Taxonomies registered outside of ACF, see this documentation: https://www.wpgraphql.com/docs/custom-post-types |
Beta Was this translation helpful? Give feedback.
-
I've created custom post types 'Albums' and 'Shows using ACF.
I've created custom fields for them, and set the fields to show in GraphQL.
I couldn't find an explicit setting for the cpt's themselves for exposing them to GraphQL.
In the GraphQL IDE query composer, I can't see anything that resembles 'albums' or 'shows'.
I've been hunting through the tree, but can't see anything.
Where should I be looking?
And if I still can't find them - what coud be preventing them from showing?
Beta Was this translation helpful? Give feedback.
All reactions