1
0
Fork 0
mirror of https://github.com/vale981/apollo-server synced 2025-03-16 15:56:41 -04:00
Commit graph

4 commits

Author SHA1 Message Date
Martijn Walraven
e4164c8892 Enable esModuleInterop and fix imports
See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html
2018-06-11 14:25:59 +02:00
David Glasser
836616bd04 Turn on noUnusedLocals and noUnusedParameters () 2018-06-01 15:16:16 -07:00
Evans Hauser
43d545f8ab
apollo-server-core: add request object to runHttpQuery for access to headers () 2018-05-24 15:43:17 -07:00
Steve Rice
083a1ee60e Avoid TypeError when querystring is present, but query missing ()
The express-graphql reference implementation [provides a check]
(2e27a73358/src/index.js (L201-L208))
to protect against cases where a GET request is made that does not
have a `query` parameter where the GraphQL query would be present.

Without this guard, graphql-js's `parse` will return `undefined`
for the `DocumentNode` since it has no document to read. Subsequently
passing this to `isQueryOperation` results in a `TypeError`, because
we are providing `undefined` where `getOperationAst` [expects to get
a DocumentNode](5fe39262a3/src/utilities/getOperationAST.js (L19)).

A new test file is added for `runHttpQuery`, as one previously did
not seem to exist.
2018-04-18 15:38:57 +03:00