apollo-server/packages/apollo-server-core
Steve Rice 083a1ee60e Avoid TypeError when querystring is present, but query missing (#964)
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
..
src Avoid TypeError when querystring is present, but query missing (#964) 2018-04-18 15:38:57 +03:00
.npmignore include readme for npm packages 2017-10-23 15:13:31 -07:00
package.json v1.3.4 2018-03-28 13:57:11 -07:00
README.md Update CHANGELOG for all releases back to v1.1.3 (#915) 2018-03-27 09:22:13 -07:00
tsconfig.json Setup prettier (#724) 2018-01-08 15:08:01 -08:00

apollo-server-core

This is the core module of the Apollo community GraphQL Server. Read the docs. Read the CHANGELOG.