Wrapper around injectQuery
Has anyone been able to create a wrapper around injectQuery?
I want to extend the query so that it has some more methods.
Doing a simple shallow copy of the query works well:
But as soon as I add a simple method, the type predicates just seems to be broken:
2 Replies
generous-apricot•8mo ago
Wrappers and maintaining good typing are indeed a challenge. What are you trying to achieve with the extra methods? Maybe there's a better way.
optimistic-goldOP•7mo ago
I successfully did it, it was a mess but I end up getting something that I’m happy with 😂
I’ll explain it tomorrow, I will go to sleep now.