-
Notifications
You must be signed in to change notification settings - Fork 273
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
Supergraph coprocessor implementation #3408
Merged
Merged
Changes from 25 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
b7292d3
move the coprocessor to a subfolder
Geal 72f42cc
request side supergraph coprocessor
Geal c53e9b0
snapshot
Geal 6a5a3b1
add one test
Geal 26fd65c
another test
Geal 82b1886
lint
Geal 8106f25
lint
Geal 8f29ed1
fix tests
Geal cfc6e15
Merge branch 'dev' into geal/supergraph-coprocessor
Geal b9ca416
supergraph response side
Geal 97efd5d
fixes to other coprocessor implementations
Geal fc62b53
lint
Geal 90b96b3
add a test for the response side
Geal 1ffe47d
changeset placeholder
Geal 4a43689
Merge branch 'dev' into geal/supergraph-coprocessor
Geal 494b939
Merge branch 'dev' into geal/supergraph-coprocessor
Geal 2680e59
cleanup
Geal 4b19e59
changeset
Geal 2c39481
Merge branch 'dev' into geal/supergraph-coprocessor
Geal bdfea1d
Merge branch 'dev' into geal/supergraph-coprocessor
Geal 35a875e
Merge branch 'dev' into geal/supergraph-coprocessor
Geal 285d817
Merge branch 'dev' into geal/supergraph-coprocessor
Geal 2df96f5
Merge branch 'dev' into geal/supergraph-coprocessor
Geal e5405ca
Merge branch 'dev' into geal/supergraph-coprocessor
Geal a38452c
metrics
Geal 7f711a9
Update apollo-router/src/plugins/coprocessor/supergraph.rs
Geal 63b43bb
lint
Geal 6cf1c4d
add docs
Geal 7cf6470
Merge branch 'dev' into geal/supergraph-coprocessor
Geal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### Supergraph coprocessor implementation ([PR #3408](https://github.com/apollographql/router/pull/3408)) | ||
|
||
This adds support for coprocessors at the supergraph service level. Supergraph plugins work on the request side with a parsed GraphQL request object, so the query and operation name, variables and extensions are directly accessible. On the response side, they handle GraphQL response objects, with label, data, path, errors, extensions. The supergraph response contains a stream of GraphQL responses, which can contain multiple elements if the query uses `@defer` or subscriptions. When configured to observe the responses, the coprocessor will be called for each of the deferred responses. | ||
|
||
By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/pull/3408 |
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
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
Oops, something went wrong.
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.
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.
I don't think method and path are relevant for the supergraph coprocessor, at this point we're speaking graphql right
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.
yes, I think there should be other fields. I didn't know if we wanted to have an entire
response
field or be able to split the response parts when sending to the coprocessor?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.
It's hard to know/decide what's required at the different stages... I tend to err on the side of "if you think someone might want it, and it's easy to provide, then include it, since it can be configured out".