Skip to content

Commit

Permalink
Fix error message for missing operation
Browse files Browse the repository at this point in the history
  • Loading branch information
denvned committed Mar 20, 2016
1 parent 57d71e1 commit debf3d1
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 debf3d1

Please sign in to comment.