-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix coprocessor empty body panic (#6398)
- Loading branch information
Showing
4 changed files
with
163 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### Fix coprocessor empty body object panic ([PR #6398](https://github.com/apollographql/router/pull/6398)) | ||
If a coprocessor responds with an empty body object at the supergraph stage then the router would panic. | ||
|
||
```json | ||
{ | ||
... // other fields | ||
"body": {} // empty object | ||
} | ||
``` | ||
|
||
This does not affect coprocessors that respond with formed responses. | ||
|
||
By [@BrynCooke](https://github.com/BrynCooke) in https://github.com/apollographql/router/pull/6398 |
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 |