🌍 Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.
However there is an additional JSON mime type used in for example ASP.NET core to return non-200 JSON responses called "application/problem+json". [1] If an API returns a response with this mime type, you'll end up with a plaintext response in your graphql server code instead of a JSON object.
It seems fairly straightforward that this type should just be added to the above check. I'll make a PR
In RESTDataSource.parseBody, it checks the media type of an API response as follows:
However there is an additional JSON mime type used in for example ASP.NET core to return non-200 JSON responses called "application/problem+json". [1] If an API returns a response with this mime type, you'll end up with a plaintext response in your graphql server code instead of a JSON object.
It seems fairly straightforward that this type should just be added to the above check. I'll make a PR
[1] https://tools.ietf.org/html/rfc7807