GROQ query for all movies that the person has been casted on #4058
Unanswered
lykemike
asked this question in
Sanity Studio Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys im new to sanity and groq, what is the query for all movie that person is casted in. e.g John Doe is being casted in 3 movies
CastMember and Person document Movie has a type array of CastMembers
CastMembers has a type reference of Person
So for every Person, I want to view all movie that person is casted in.
This is the query i have tried but it doesnt work *[_type == 'person' && castMembers[].person._ref in *[_type == "person" && name=="Elissa Knight"]._id]{...}
Beta Was this translation helpful? Give feedback.
All reactions