Skip to content

Commit

Permalink
throwHttpGraphQLError if response.data === null
Browse files Browse the repository at this point in the history
  • Loading branch information
KATT committed Jul 25, 2019
1 parent 7660727 commit 4659a4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/apollo-server-core/src/runHttpQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export async function processHTTPRequest<TContext>(

// This code is run on parse/validation errors and any other error that
// doesn't reach GraphQL execution
if (response.errors && typeof response.data === 'undefined') {
if (response.errors && (response.data === null || typeof response.data === 'undefined')) {
// don't include options, since the errors have already been formatted
return throwHttpGraphQLError(
(response.http && response.http.status) || 400,
Expand Down

0 comments on commit 4659a4e

Please sign in to comment.