diff --git a/package.json b/package.json index 3d466e9..30996e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adonis-apollo-server", - "version": "1.0.2", + "version": "1.0.4", "description": "Production-ready Node.js GraphQL server for AdonisJS", "main": "index.js", "scripts": { diff --git a/src/ApolloServer/index.js b/src/ApolloServer/index.js index cdbae8e..343eedd 100644 --- a/src/ApolloServer/index.js +++ b/src/ApolloServer/index.js @@ -23,7 +23,9 @@ class ApolloServer { options: options, query: request.method() === 'POST' ? request.post() : request.get() }).then((gqlResponse) => { - return response.json(gqlResponse) + return response + .header("content-type", "application/json") + .send(gqlResponse) }, error => { if ('HttpQueryError' !== error.name) { throw error