This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to access reverse relations within entry query in GQL #7110
Comments
This has been added for Craft 3.6 |
Well, in its own branch for now. |
Merged now. Note that it’s |
Craft 3.6 RC2 is out now with these new GraphQL arguments. |
Craft 3.6 has now been officially released ✨ |
Just had a conversation on Discord with @andris-sevcenko on this – the actual issue at hand here is not resolved and even if it may not be feasible to do it in the GraphQL API without changes to the Element Query API or Element itself I think the issue should be reopened because the use case is very valid (and well explained in the original post above). |
Whoops, you’re right @membla. Guess we were on a different brainwave. We’re considering how to best address this. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
It would be really useful if when querying entries in GraphQL you could get reverse related elements to that entry, which would avoid you having to do multiple GraphQL calls of "get the entry ID, and then run another GraphQL query with
relatedTo()
because this can quickly add up and become clunky.Original comment from other thread
Just a thought, and apologies if this was covered in other thoughts above and I misunderstood, would a good syntax for this be something like
relatedEntries
,relatedAssets
etc. which behave like a normalentries
/asset
loop but with therelatedTo
pre-populated with the current entry. So you could do things like this very weird, but hopefully useful example...?Originally posted by @andrewfairlie in #5143 (comment)
The text was updated successfully, but these errors were encountered: