Skip to content

Commit e4ecbe0

Browse files
getOperationAST: make operationName optional (#2622)
1 parent f2c2b78 commit e4ecbe0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/utilities/getOperationAST.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ import { DocumentNode, OperationDefinitionNode } from '../language/ast';
99
*/
1010
export function getOperationAST(
1111
documentAST: DocumentNode,
12-
operationName: Maybe<string>,
12+
operationName?: Maybe<string>,
1313
): Maybe<OperationDefinitionNode>;

src/utilities/getOperationAST.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
*/
1414
export function getOperationAST(
1515
documentAST: DocumentNode,
16-
operationName: ?string,
16+
operationName?: ?string,
1717
): ?OperationDefinitionNode {
1818
let operation = null;
1919
for (const definition of documentAST.definitions) {

0 commit comments

Comments
 (0)