-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
queries with defer must have the Accept: multipart/mixed header (#1610)
Fix #1618 Since deferred responses can come back as multipart responses, we must check that the client supports that content type. This will allow older clients to show a meaningful error message instead of a parsing error if the `@defer` directive is used but they don't support it
- Loading branch information
Showing
7 changed files
with
130 additions
and
18 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
14 changes: 14 additions & 0 deletions
14
apollo-router/tests/snapshots/integration_tests__defer_query_without_accept.snap
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,14 @@ | ||
--- | ||
source: apollo-router/tests/integration_tests.rs | ||
assertion_line: 646 | ||
expression: first | ||
--- | ||
{ | ||
"errors": [ | ||
{ | ||
"message": "the router received a query with the @defer directive but the client does not accept multipart/mixed HTTP responses", | ||
"locations": [], | ||
"path": null | ||
} | ||
] | ||
} |