Vinnie
Infer context from procedure after middleware
Okay I didn't come up with a direct solution, but I did solve it in a different way.
Instead of just having the handler functions be in separated files. These ->
.mutation(handlerFunc)
I moved the whole creation of the procedure into seprate files. This way you can put the handler function directly into the .mutation
call. This way the options (so also the context) are correctly inferred and the need to import the Context
type becomes unnecessary.
Hope this helps other people witht he same problem :)4 replies