Skip to content

Commit 9b06a20

Browse files
committed
OverlappingFieldsCanBeMerged: arguments always have value
Replicates graphql/graphql-js@00495a2
1 parent eb165da commit 9b06a20

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/graphql/validation/rules/overlapping_fields_can_be_merged.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
FragmentSpreadNode,
1010
InlineFragmentNode,
1111
SelectionSetNode,
12+
ValueNode,
1213
print_ast,
1314
)
1415
from ...type import (
@@ -598,8 +599,8 @@ def same_arguments(
598599
return True
599600

600601

601-
def same_value(value1, value2):
602-
return (not value1 and not value2) or (print_ast(value1) == print_ast(value2))
602+
def same_value(value1: ValueNode, value2: ValueNode) -> bool:
603+
return print_ast(value1) == print_ast(value2)
603604

604605

605606
def do_types_conflict(type1: GraphQLOutputType, type2: GraphQLOutputType) -> bool:

tests/validation/test_overlapping_fields_can_be_merged.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
assert_valid = partial(assert_errors, errors=[])
1111

1212

13-
def assert_valid_with_schema(schema, query_str):
14-
assert_errors(query_str, [], schema)
15-
16-
1713
def describe_validate_overlapping_fields_can_be_merged():
1814
def unique_fields():
1915
assert_valid(

0 commit comments

Comments
 (0)