How would I filter using a "deep" property? For e...
# orm-help
m
How would I filter using a "deep" property? For example, I have an
User
that has
posts: Post
How would I filter the list of users that has posted an specific post for example:
Copy code
query GetUser {
  users (after: { posts_some: { title_eq: 'My post' } }) {
    name
  }
}
I'm using nexus and prisma2, and nexus is not allowing me to filter that deep with
t.crud.users()
a
Add this properties to t.crud.users({filtering:true })
👍 1
And you can add ordering: true
m
Oh thank you!
a
Oh for deep relation filter you need to pass this properties to t.model.posts({filtering: true, ordering: true})
m
That worked. Nice!