-
Notifications
You must be signed in to change notification settings - Fork 565
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
Support 'application/graphql-response+json' #1616
Conversation
🦋 Changeset detectedLatest commit: df1fdea The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest changes of this PR are not available as canary, since there are no linked |
❌ Benchmark FailedFailed assertions detected
|
@@ -12,14 +12,18 @@ export function isRegularResult( | |||
if (!isAsyncIterable(result)) { | |||
const acceptHeader = request.headers.get('accept') | |||
if (acceptHeader && !acceptHeader.includes('*/*')) { | |||
if (acceptHeader.includes('application/json')) { | |||
acceptHeaderByResult.set(result, 'application/json') | |||
if (acceptHeader.includes('application/graphql-response+json')) { |
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.
should we also keep the support for application/json
here?
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.
We still support it but we change the order here. If accept header has the newer one with application/json
, we choose the newer one.
Also now the order is updated per spec.