-
Notifications
You must be signed in to change notification settings - Fork 60
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
Clarification for Accept: */*
#242
Comments
According to the reference implementation |
It’s the servers choice; but I think defaulting too application/json prior to watershed and application/graphql-response+json after is reasonable. In fact you could go hybrid and use graphql-response on error even now so you can start using the HTTP codes! |
The HTTP protocol has a number of semantics for the |
Yes, that would be good @Shane32. |
I actually disagree here. A client that sets no accept header expects the default. A client that says |
Yes, that's correct. In reality most web-based GraphQL clients will actually send I think we're in a weird spot, since legacy clients might unknowingly tell the server they accept anything, while they probably don't in reality. |
The HTTP RFC 2616 states:
In other words, a missing |
Though that is indeed what the spec says (which aligns with what I suggest for users who explicitly set But either way, it’s the server’s choice, I don’t think we need to dictate this. |
The spec is pretty clear on what to do if the
Accept
header is not specified or has a value of eitherapplication/graphql-response+json
orapplication/json
. It's not so clear to me though, which responseContent-Type
the server should choose in the case ofAccept: */*
(especially during the legacy watershed period). It would be great if the spec could clarify this part.The text was updated successfully, but these errors were encountered: