Closed stefanmomm closed 5 months ago
@stefanmomm thanks for opening an issue and providing details about your scenario.
While WPGraphQL for ACF does attempt to automatically map ACF Field Groups to the Schema based on location rules, some rules are difficult to interpret and are not mapped automatically.
Your location rules fall into that category.
When you set a location rule to be something and also not that same thing (i.e. pages, but not one specific page) then the auto mapping isn't sure how to apply the rule.
In these cases, you will need to manually map the ACF Field Group to the schema using the "Manually Set GraphQL Types for Field Group"
You can read more about this here: https://acf.wpgraphql.com/adding-acf-fields-to-the-wpgraphql-schema/#acf-field-group-location-rules
Description
I have created a new field group that is displayed on all pages, but I want to exclude a specific page. I have activated "Show in GraphQL", but it is not displayed in GraphQL for any page (not only the excluded one). Only when I remove the second rule (the excluded page) is it displayed correctly. If I add the rule again, the field group disappears from GraphQL again.
Steps to reproduce
PHP or JSON export of the ACF Field Group(s)
No response
Additional context
No response
WPGraphQL Version
1.26.0
WPGraphQL For ACF Version
2.2.0
ACF (Advanced Custom Fields) Version. Free or Pro?
6.3.0.1 (Pro)
WordPress Version
6.5.3
PHP Version
8.2.18
Additional enviornment details
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have disabled ALL plugins except for WPGraphQL, WPGraphQL For ACF, ACF, etc.