apollo-server: requestDidStart hook not called if context creation failes
If an error is thrown during context creation the requestDidStart
hook is not called. As a result, using didEncounterErrors
is not possible for those errors.
Note: formatError
function is called
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 10
- Comments: 17 (7 by maintainers)
I have the same issue where the requestDidStart hook is not called, here’s the reproduction I made. It cause the code you provide here to not work because the plugin is never called. Hope it will help!
+1 I’m having the exact same issue as @cbdt. Please just let us know if we’re doing something wrong or if the hook is not working as intended.