Closed Csardelacal closed 1 year ago
I just noticed the unit test failing, and I am assuming that it is in order to allow rest endpoints to still work with the application/json
header. It seems that the json content-type is generally very common across graphql clients (I use Altair and Vue-Apollo and they both do use it).
Is there any way to make the application/json
header work with GraphQL?
Yea, it's not working like you think. Please review that file again. GraphQLite should be accepting both application/json
and application/graphql
. The responses are handled differently. We use Altair ourselves without issue.
Okay, it seems that the trailing slashes in the URL were causing trouble. Thanks for looking into it regardless.
Altair, for example, sends all of it's requests using application/json in it's content-type. Adding this allows graphqlite to properly parse the json sent by Altair. Everything seems to work as expected the moment it's added to the whitelisted content-types.