Skip to content

Commit

Permalink
getOperationAST: make operationName optional (graphql#2622)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored Jun 6, 2020
1 parent f2c2b78 commit e4ecbe0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utilities/getOperationAST.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ import { DocumentNode, OperationDefinitionNode } from '../language/ast';
*/
export function getOperationAST(
documentAST: DocumentNode,
operationName: Maybe<string>,
operationName?: Maybe<string>,
): Maybe<OperationDefinitionNode>;
2 changes: 1 addition & 1 deletion src/utilities/getOperationAST.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
*/
export function getOperationAST(
documentAST: DocumentNode,
operationName: ?string,
operationName?: ?string,
): ?OperationDefinitionNode {
let operation = null;
for (const definition of documentAST.definitions) {
Expand Down

0 comments on commit e4ecbe0

Please sign in to comment.