Skip to content

Own Filter implementation with Comparison #626

Answered by hayes
noxify asked this question in Q&A
Discussion options

You must be logged in to vote

Looks interesting, thanks for sharing!

One things that jumps out at me is that you need some ts-ignores, what I would instead is have your helper methods return InputObjectRefs of the correct type, that way when you are using them to implement filters objects you don't need that ts-ignore

I see you are creating a seperate filter type for each column, this probably is over-kill you can probably just create a single IntFilter, StringFilter, etc and use the same filter type for every column of the same type.

If you fix the typing for your scalar filter types, you probably won't need the interfaces for many of your object types. Passing in an interface as a generic is really only required if …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by noxify
Comment options

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