First, I love Gatsby! Thanks for all your work. I was wondering if anyone has been able to get recursive ACF fields to come through graphql via the wordpress source plugin. Here is the discussion on the ACF-to-REST page:
https://github.com/airesvsg/acf-to-rest-api/issues/109
The maintainer there created a plugin, which, out of the box, causes ECONNRESET issue when running Gatsby develop. (see bottom of that post)
It's pretty vital to be able to read ACF fields out of Relationships and Post Objects within other ACF fields. Has anyone had any luck getting this to work?
Currently a post object returned in an ACF field does not provide access to any of the ACF fields within that post object.
I can confirm that ACF fields from Post Object/Relationship fields are queryable in GraphQL. You'll need to install the recursive plugin and use the filter like so:
add_filter('acf/rest_api/recursive/types', function( $types ) {
$types += array(
'post_type_slug' => 'post_type_slug'
);
return $types;
} );
Old issues will be closed after 30 days of inactivity. This issue has been quiet for 20 days and is being marked as stale. Reply here or add the label "not stale" to keep this issue open!
This issue is being closed due to inactivity. Is this a mistake? Please re-open this issue or create a new issue.
Most helpful comment
I can confirm that ACF fields from Post Object/Relationship fields are queryable in GraphQL. You'll need to install the recursive plugin and use the filter like so: