Skip to content

Commit 7cfd686

Browse files
authored
Fix typo in AST predicates (#1462)
1 parent f4f15b3 commit 7cfd686

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/language/kinds.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const Kind = Object.freeze({
1818
DOCUMENT: 'Document',
1919
OPERATION_DEFINITION: 'OperationDefinition',
2020
VARIABLE_DEFINITION: 'VariableDefinition',
21-
VARIABLE: 'Variable',
2221
SELECTION_SET: 'SelectionSet',
2322
FIELD: 'Field',
2423
ARGUMENT: 'Argument',
@@ -29,6 +28,7 @@ export const Kind = Object.freeze({
2928
FRAGMENT_DEFINITION: 'FragmentDefinition',
3029

3130
// Values
31+
VARIABLE: 'Variable',
3232
INT: 'IntValue',
3333
FLOAT: 'FloatValue',
3434
STRING: 'StringValue',

src/language/predicates.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ export function isSelectionNode(node: ASTNode): boolean %checks {
3535

3636
export function isValueNode(node: ASTNode): boolean %checks {
3737
return (
38+
node.kind === Kind.VARIABLE ||
3839
node.kind === Kind.INT ||
3940
node.kind === Kind.FLOAT ||
4041
node.kind === Kind.STRING ||
4142
node.kind === Kind.BOOLEAN ||
4243
node.kind === Kind.NULL ||
4344
node.kind === Kind.ENUM ||
4445
node.kind === Kind.LIST ||
45-
node.kind === Kind.OBJECT ||
46-
node.kind === Kind.OBJECT_FIELD
46+
node.kind === Kind.OBJECT
4747
);
4848
}
4949

0 commit comments

Comments
 (0)