Skip to content

Commit 5a656cc

Browse files
committed
Handle printing queries with integer arguments
The GitHub v4 API uses integer argument for paging. Without this patch, the code would attempt to run (essentially) `"last" + ": " + 10`, which isn't valid in Python. With this change, an argument value of `.args(last=10)` is correctly pretty-printed as `(last: 10)`.
1 parent 431ea35 commit 5a656cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphql/language/printer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def leave_Field(self, node, *args):
4747
], ' ')
4848

4949
def leave_Argument(self, node, *args):
50-
return node.name + ': ' + node.value
50+
return '{0.name}: {0.value}'.format(node)
5151

5252
# Fragments
5353

0 commit comments

Comments
 (0)