Skip to content

Commit

Permalink
Merge pull request #319 from denvned/patch-1
Browse files Browse the repository at this point in the history
Fix error message for missing operation
  • Loading branch information
leebyron committed Mar 22, 2016
2 parents e3f53ec + debf3d1 commit 3ce90fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/execution/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function buildExecutionContext(
}
});
if (!operation) {
if (!operationName) {
if (operationName) {
throw new GraphQLError(`Unknown operation named "${operationName}".`);
} else {
throw new GraphQLError('Must provide an operation.');
Expand Down

0 comments on commit 3ce90fa

Please sign in to comment.