You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting this. This ACF "location rule" is not yet supported.
For context, should anyone come across this:
The GraphQL Schema is independent of any context, such as the user's role, for example. The Schema is representation of what's possible (what can be asked for), and Resolvers take into consideration context (such as the current user, or a specific object being resolved) when resolving the info. . .but in ACF, there is context, because you're loading a specific admin page to interact with the fields.
Mapping contextual rules from ACF Field Groups, such as a specific page or a specific user role, gets tricky, because the GraphQL Schema is the same Schema regardless of resolve context
so adding support for those contextual locations has been tricky to say the least.
This is a location I think we should support.
The way I see it working would be that the fields should be added to the User Type.
This way, the fields can be asked for anytime a user is asked for. During resolution, the user role can be checked, and if the user has the assigned capability, the fields will resolve. If the user doesn't have the assigned capability, the field group will return null.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's pretty much the same as #59 except resolved conflicts.