is there a test implementation of `GenericMutationCtx`?
hi team! i wonder if it's possible to get a test version of
GenericMutationCtx
that i can override in the test files? i've been doing @ts-ignore for the ctx in myFunc
and it's been tripping me all over 😂5 Replies
Sooner than later we will provide a way to test queries and mutations. Stay tuned!
thanks michal. in the meantime, do u know how can i make my test more robust? i want to do a match on the arg im passing in
is it possible to do some sort of
filter: vi.fn().IF_EMAIL_MATCHES_hello@world.com.mockReturnValue()
?You can do
mockImplementation
instead of mockReturnValue
thanks. ok i think im close,
but still getting
TypeError: q.field is not a function
im not sure if im doing the lambda func wrongly...? do u have any idea?I think this is super cumbersome. Could you pull out the whole DB read into a function and mock that instead?