New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
context
is initially undefined since v1.9.0
#90
Comments
this is related to execute removing support for positional args. Args for execute were converted to be an object, but they key for context should have been updated to be c8750f3#diff-6c8aa63d319597d6d7fff26fda262c760963d5a73d99ad303c0da528bbd376a5R140 Technically this was also a breaking change since any provided context function is now called with completely different arguments. I think it would probably also make sense to align formatResult with this new API so both are called with |
Happy to submit an PR if you want, just need to know how to resolve this (which combination of the following fixes makes sense).
|
@ardatan can you please check this? |
Confirmed this. It also breaks usage with getEveloped (https://github.com/dotansimha/envelop) |
Fix is being worked on in #91 |
Confirmed as resolved in 0.9.1. |
Working perfect now thanks! |
🎉 |
Since v1.9.0 the
context
in a resolver seems to be initially undefined.This leads to errors like
Here's a repro: https://stackblitz.com/edit/node-ysprk8
I've just taken the context example from
graphql-helix
.When you switch the versions in the stackblitz from
v1.9.0
tov1.8.4
inpackage.json
it will work again.The text was updated successfully, but these errors were encountered: