How to filter documents on the properties of their linked documents?

I think you need to change your graphql query to request data{}. Also if you’re returning the full document like this then you have to pass paginated: true in your @resolver the same way you are for allUsers. If you look at the schema in Graphql Playground after you upload, passing paginated: true actually rewrites your schema definition to return an automatically generated type that includes the ref and ts and then your defined type will exist in data which is why you have to use data in your graphql query when returning the full document

input LocationInput {
  name: String!
}

type Query {
  allUsers: [User!]! @resolver(name: "all_users", paginated: true)
  allUsersByLocation(input: LocationInput!): [User!]!
    @resolver(name: "all_users_by_location3", paginated: true)
}
query {
  allUsersByLocation(input: { name: 'some place' }) {
    data {
      fullName
      createdAt
    }
  }
}
1 Like