wp-graphql-acf
wp-graphql-acf copied to clipboard
Regression on relationship fields since WPGraphQL 1.7.0
Since WPGraphQL 1.7.0 it is not possible to query relationship fields. I can't tell if it's a problem with the connectors or with the new version of GraphiQL
https://github.com/wp-graphql/wp-graphql/compare/v1.6.12...v1.7.0
Before
After
There is no difference between version 1.7.0 after npm i + npm build or version 1.8.0. Works fine until 1.6.12
ACF 5.9.5 WPGraphQL 1.7.0 - 1.8.0
@jasonbahl , Please take a look
@rodrigo-arias Found Any Solution Or Downgrade the version ??
@tsrCodes I haven't dived into it, I just went back to 1.6.12 doesn't seem like a big deal for now, but potentially it will be if new versions of WPGraphQL introduce fixes or new features
Agree with that , not a big problem @rodrigo-arias but Seems there's two major releases , after that
I'm having the same issues, using Flexible Content with some relationship fields inside. Sometimes relationship fields will show up in the schema, but will always return null when queried for despite data being there. I tried downgrading to 1.6.12, but it completely broke the site (also using WP Gatsby, WPGraphQL for ACF, and WPGraphQL for Gravity Forms).
So far, Post Object is the only relationship field I've found that doesn't show up in the schema. Taxonomy and User fields in the relationship subset do show up in the schema, but always return null when queried for.
Problem with GraphiQL IDE https://github.com/wp-graphql/wp-graphql/issues/2370#issue-1229931135
I want to come back to this to say that I've been able to get most relationship fields working. One thing I forgot to do inside of a custom post type declaration was to set
This needs to be set in both the CPT, and any related taxonomies that may be related. I can now pull up relationship fields both in GraphiQL (running off of Gatsby) and on my headless site.
@jordanlewis9 Use CPT UI Plugin for New Post Types , they have support for WPGraphQL
I double-checked just in case, but the relationships aren't working. The same happens with the latest current version of WPGraphQL 1.8.2
Ah @rodrigo-arias , think problem with GraphiQL IDE itself means Query Composer doesn't help with quert field suggestions
Just Try like below
menus {
... on Post {
title
}
}
@tsrCodes that's accurate, the connections are there, but Query Composer doesn't show them in the tree, nor does the autocomplete in the Query Editor.
It would be nice to be able to resolve this to have access to this fix introduced in v1.7.0
Described issue still present in WPGraphQL 1.10.0 and with latest update to WPGraphQL for Advanced Custom Fields 0.6.1
This was fixed in release 1.12.0. Thank you so much @chrisherold!