$or operator for filtering
There seems to be no defined way to use $or operators in filters. Can you suggest the proper way of adding a resolver for such case? I imagine that the resulting graphQL schema should look sth. like this:
input filterInput {
OR: [filterInput!]!
}
Good feature request. Added in 3.1.0
All filter arguments now get AND and OR fields, where you may provide complex nested sub-queries. Affected filter arguments in the following resolvers: findOne, findMany, updateOne, updateMany, removeOne, removeMany.
Current test case: https://github.com/graphql-compose/graphql-compose-mongoose/blob/6abef5fcfed5c4132c84ee74f02fb93273ce70c0/src/tests/github-issues-test.js#L156-L190
WOW. That was a fast turnaround for a feature request. Thanks!
I gave this a try and it works great when using field filters, but custom filter arguments, ones added with resolver.addFilterArg, aren't being picked up when used inside an OR/AND
@bakuzan I opened a new issue with your problem: https://github.com/graphql-compose/graphql-compose-mongoose/issues/95 Lets discuss it there separately.