-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Execute: Remove excessive arguments #1268
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just avoid keying into the opaque info
object provided for resolvers
src/execution/execute.js
Outdated
fieldNodes[0], | ||
exeContext.variableValues, | ||
info.fieldNodes[0], | ||
info.variableValues, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Info should be opaque to the executor internals - it's only used to pass into resolvers. These two should be either passed in directly as arguments or pulled from exeContext
src/execution/execute.js
Outdated
if (isPromise(completed)) { | ||
return completed.then(undefined, error => | ||
Promise.reject( | ||
locatedError( | ||
asErrorInstance(error), | ||
fieldNodes, | ||
info.fieldNodes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly here - the fieldNodes
value is an important argument to the completeValue
functions - it should be passed directly instead of extracted from the info passed to resolvers
03573bf
to
6d8e214
Compare
@leebyron I removed all changes that used data from the |
Great! |
Using benchmark, I didn't measure any performance difference.