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
refactor: streamline buildExecutionContext #3196
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yaacovCR
force-pushed
the
throw-on-build-error
branch
from
June 22, 2021 14:30
fa39d24
to
cf57d46
Compare
yaacovCR
changed the title
refactor: throw GraphQLAggregateErrors from buildExecutionContext
refactor: streamline buildExecutionContext
Jun 22, 2021
yaacovCR
force-pushed
the
consolidate-subscription
branch
3 times, most recently
from
October 4, 2021 14:02
ec4518e
to
dc88bcf
Compare
yaacovCR
force-pushed
the
throw-on-build-error
branch
from
October 4, 2021 15:26
a3c2256
to
92912b4
Compare
All operations, including subscription operations, are covered by the execution section of the GraphQL spec
...and executeQueryOrMutationRootFields to prepare for integration of executeSubscription
this function currently does not throw GraphQLErrors -- it is not within the parallel try block within execute
yaacovCR
force-pushed
the
consolidate-subscription
branch
from
October 5, 2021 18:05
dc88bcf
to
112feed
Compare
to executeSubscriptionRootField
...to execution file
to operate only on ExecutionContext
-- In at least a few cases, destructuring assignment from exeContext can improve code readability. -- Overrides to exeContext can be set using object spread syntax.
yaacovCR
force-pushed
the
consolidate-subscription
branch
from
October 5, 2021 18:10
112feed
to
83a7f41
Compare
yaacovCR
force-pushed
the
throw-on-build-error
branch
5 times, most recently
from
October 6, 2021 21:38
9b99e35
to
9cab1b5
Compare
@IvanGoncharov , this is ready for review. based on the feedback to #3192, I have abandoned the throw on build error approach (despite the retained name of the branch) and am now basically going at least initially with @glasser suggestion #3169 (comment) to separate out the document normalization and variable coercion steps from the main execute flow. |
Execution arguments object can be passes as-is to the function. assertValidExecutionArguments can be called within the function rather than prior
...capable of processing requests of all operation types. ExecutionArgs now augmented with all relevant arguments for subscriptions as well.
existing flow hid the execution request spec portion within the execution context object setup -- the algorithm steps belong within the function itself.
yaacovCR
force-pushed
the
throw-on-build-error
branch
from
October 6, 2021 21:49
9cab1b5
to
ec09843
Compare
yaacovCR
force-pushed
the
consolidate-subscription
branch
from
October 7, 2021 14:51
535e210
to
758d31e
Compare
Closed this in favor of PR stack 3293 => 3302. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation: these changes significantly slim down execute/subscribe, paving the way for refactoring the execution methods into a class where the constructor uses to buildExecutionContext to set up the executionContext (or its constituent properties) as class member(s).
Depends on #3195