-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If a coprocessor responds with an empty body at the supergraph stage then the router would panic as there was a false expectation that the query had already been validated. There is a deeper issue around coprocessors and their ability to modify the query before processing. As query analysis and pluginss may use the query to populate context modifying the query won't necessarily do what the user wants. In fact the router will simply ignore the modified query as the parsed version is already in context.
- Loading branch information
bryn
committed
Dec 4, 2024
1 parent
dcb192c
commit 373f437
Showing
3 changed files
with
128 additions
and
1 deletion.
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
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
24 changes: 24 additions & 0 deletions
24
apollo-router/tests/integration/fixtures/coprocessor.router.yaml
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,24 @@ | ||
# This coprocessor doesn't point to anything | ||
coprocessor: | ||
url: "<replace>" | ||
router: | ||
request: | ||
body: true | ||
response: | ||
body: true | ||
supergraph: | ||
request: | ||
body: true | ||
response: | ||
body: true | ||
subgraph: | ||
all: | ||
request: | ||
body: true | ||
response: | ||
body: true | ||
execution: | ||
request: | ||
body: true | ||
response: | ||
body: true |