Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Certain location rules cause the field group to not show up in GraphQL #233

Closed
michaelpanik opened this issue Mar 17, 2021 · 6 comments
Closed
Labels
bug Something isn't working Location Rules Issues related to ACF Location Rules

Comments

@michaelpanik
Copy link

I have a field group that when I set the location rule to "Post Type is Post" it shows in GraphQL without issue.

If I set the location rule to "Post Format is Video" it does not show.

Is this by design? Is there something else I need to do in order to make this field show when setting post format rules?

@arnespremberg
Copy link

This seems to be the expected behaviour - most page rules are not supported yet. See this tag for more related issues:
https://github.com/wp-graphql/wp-graphql-acf/issues?q=is%3Aissue+is%3Aopen+label%3A%22Location+Rules%22

@michaelpanik
Copy link
Author

@arnespremberg thanks! I saw @stupearce's fix in another thread, I may give that a go. Thanks for pointing me in the right direction!

@arnespremberg
Copy link

I managed to get your described behaviour to work today by using the code from this PR:
rsm0128@6cb6193

@michaelpanik
Copy link
Author

I managed to get your described behaviour to work today by using the code from this PR:
rsm0128@6cb6193

This is awesome. Maybe they can verify and roll that in for the next version?

@arnespremberg
Copy link

I think they're currently reviewing :) the appropriate issue is this one: #135

@jasonbahl jasonbahl added bug Something isn't working Location Rules Issues related to ACF Location Rules labels Mar 26, 2021
@jasonbahl jasonbahl added this to the ACF Schema Location Rules milestone Mar 30, 2021
@jasonbahl
Copy link
Contributor

jasonbahl commented Apr 20, 2021

👋🏻 Hey!

Location Rules have been completely revamped in v0.5.0 (#250)!

There's a video walking through things here: https://www.youtube.com/watch?v=VvrZGrcwv0Y

For this specific issue:

If I set the location rule to "Post Format is Video" it does not show.

This has been addressed. The location rules automatically map this better than before. You can see below that if I set this rule, the Field Group will show in the GraphQL Schema on the Post Type. And you have the option to manually associate the Field Group with other Types in the Schema if the auto-mapping logic doesn't quite do what you need it to.

Screen Shot 2021-04-20 at 4 16 24 PM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Location Rules Issues related to ACF Location Rules
Projects
None yet
Development

No branches or pull requests

3 participants