graphql-dotnet / graphql-dotnet/graphql-client
Response content types of `application/graphql-response+json` are not always handled
- Dominant language
- C#
- Stars
- 648
- Forks
- 136
- PR merge metrics
- No merged PRs in 30d
Description
Some GraphQL servers, such as those based on current versions of Hot Chocolate, only respond with `application/graphql-response+json`. In this case, the server may respond with various 4xx status codes, expecting the client to parse them. This is noted in the source code. However, any status code that is not 2xx or 400 is rejected.
https://github.com/graphql-dotnet/graphql-client/blob/6236c9b2c6f3568f96a9f8e12aa6fb367321c068/src/GraphQL.Client/GraphQLHttpClientOptions.cs#L63-L78
This shouldn't matter most of the time for servers that support `application/json` per the GraphQL over HTTP draft spec, since the default Accept header is set to `application/json`, and the server should return 200 for all responses that can be parsed with that content type.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.