Skip to content

Commit

Permalink
FIX: Incorrect Content-Type for apollo-server-adonis (#910)
Browse files Browse the repository at this point in the history
* FIX: Incorrect Content-Type for apollo-server-adonis

* feat: use response.type rather response.header

* Update CHANGELOG.md
  • Loading branch information
CaptainJojo authored and abernix committed Apr 11, 2018
1 parent a06796e commit afe5df4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All of the packages in the `apollo-server` repo are released with the same version numbers, so a new version of a particular package might not represent an actual change to that package. We generally try to mark changes that affect only one web server integration package with that package name, and don't specify package names for changes that affect most of the packages or which affect shared core packages.

### vNEXT

* `apollo-server-adonis`: The `Content-type` of an operation response will now be correctly set to `application/json`.

### v1.3.4

* Upgrade to `apollo-cache-control@0.1.0` and allow you to specify options to it (such as the new `defaultMaxAge`) by passing `cacheControl: {defaultMaxAge: 5}` instead of `cacheControl: true`.
Expand Down
3 changes: 2 additions & 1 deletion packages/apollo-server-adonis/src/adonisApollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export function graphqlAdonis(
query,
}).then(
gqlResponse => {
response.json(gqlResponse);
response.type('application/json');
response.send(gqlResponse);
},
(error: HttpQueryError) => {
if ('HttpQueryError' !== error.name) {
Expand Down

0 comments on commit afe5df4

Please sign in to comment.