Skip to content

Filtering inner collections with where clause not working #4486

Answered by durajetz
durajetz asked this question in Q&A
Discussion options

You must be logged in to vote

Solved

I just added the [UseFiltering] annotation at list of authors property inside AuthorsWithCount object

public class AuthorsWithCount 
    {
        [UseFiltering]
        public List<Authors> Authors{ get; set; }
        public int Count { get; set; }
    }

and then changed the graphQL query to this:

query {
  GetData{
    authors (where: { authors: { some: { uuId: { eq: "123" } } } }){
      uuId
    }
    count
  }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by durajetz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant