问题
I would like to be able to filter all of the awards by using a condition on the artist
as shown below.The idea here is that I can then filter on multiple facets. By artist name, by event name/date and by categories in one query.
query {
allAwards {
edges {
node {
nodeId
categoryByCategoryId {}
eventByEventId {}
artistByArtistId(condition:{firstname:"Juan"}) {}
}
}
}
}
Is there a way to do a condition/filter on the artistByArtistId/categoryByCategoryId/eventByEventId
that will only return awards
that match say, the artists name?
Or is the only way to reverse the query as below:
query {
allArtists(condition:{firstname:"Juan"}) {
edges {
node {
nodeId
awardsByArtistId {
edges {
node {
nodeId
}
}
}
}
}
}
}
Schema
Awards
Artists
来源:https://stackoverflow.com/questions/59524125/how-to-use-a-condition-for-a-nested-relation-gql