graphql-compose-mongoose icon indicating copy to clipboard operation
graphql-compose-mongoose copied to clipboard

Support RegularExpression for filtering Operators

Open chanhohang opened this issue 5 years ago • 4 comments

Hi,

I am just wondering if it's possible to support "like" for text fields in _operators when doing filtering?

that will be very useful for my use case.

thanks.

chanhohang avatar Mar 26 '19 01:03 chanhohang

You may use Resolver.addFilterArg method:

https://github.com/graphql-compose/graphql-compose/issues/22

nodkz avatar Mar 27 '19 05:03 nodkz

Thanks for your reply and that works.

Though I think it will be very helpful if Regex can be supported out of the box for text fields for the library.

chanhohang avatar Mar 27 '19 07:03 chanhohang

Pull request welcome ;)

See resolvers folder. It's quite simple.

nodkz avatar Mar 27 '19 08:03 nodkz

I also think this feature will be amazing so...

Pull request in... https://github.com/graphql-compose/graphql-compose-mongoose/pull/174

freitasmurillo avatar Jun 12 '19 19:06 freitasmurillo