Skip to content

Commit 9c74449

Browse files
committed
Validate query arguments against graphql name not python name
1 parent 9b1db29 commit 9c74449

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sgqlc/codegen/operation.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,9 @@ def validate_required_arguments(self, node):
456456
if a['type']['kind'] == 'NON_NULL' and a['defaultValue'] is None:
457457
required.add(a['name'])
458458

459-
for name, _ in node.arguments:
460-
if name in required:
461-
required.remove(name)
459+
for _, var in node.arguments:
460+
if var.name in required:
461+
required.remove(var.name)
462462

463463
if required:
464464
raise ValueError(

0 commit comments

Comments
 (0)