Closed npdev453 closed 2 years ago
Ah, its because I call it without async
keyword.
but is it really nessesacy with synchronius logic? (also its conflict with eslint no async without awaits
rule)
app.graphql.addHook('preExecution', async (schema, document, context) => {});
Seems like in type should be something ()=>Promise<T> | T
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.
It's ok to update the types to ()=>Promise<T> | T
.
@mcollina, I'd like to send a PR to address this issue. Can you assign it to me?
go for it!
That code:
make that error: