Skip to content

Commit afb10cf

Browse files
committed
Updated drivers.js with full directives checks
1 parent fa019c3 commit afb10cf

File tree

2 files changed

+314
-239
lines changed

2 files changed

+314
-239
lines changed

graphql-api-generator/utils/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def ast_type_to_string(_type: GraphQLType):
773773
:return:
774774
"""
775775

776-
# ast_nodes types behavies differnetly than for other types (as they are NodeTypes)
776+
# ast_nodes types behavies differently than other types (as they are NodeTypes)
777777
# So we can't use the normal functions
778778

779779

@@ -803,7 +803,7 @@ def ast_type_to_string(_type: GraphQLType):
803803

804804
def directive_from_interface(directive, interface_name):
805805
"""
806-
Return the correct directive string fro directives inhertied from interfaces
806+
Return the correct directive string from directives inhertied from interfaces
807807
:param directive:
808808
:param interface_name:
809809
:return string:
@@ -834,6 +834,7 @@ def get_directive_arguments(directive):
834834
for arg in directive.arguments:
835835
output+= arg.name.value + ':'
836836
if isinstance(arg.value, ListValueNode):
837+
# List
837838
output+= '['
838839
for V in arg.value.values:
839840
if isinstance(V, StringValueNode):
@@ -844,6 +845,7 @@ def get_directive_arguments(directive):
844845
output = output[:-2] + ']'
845846

846847
else:
848+
# Non-list
847849
if isinstance(arg.value, StringValueNode):
848850
output+='"' + arg.value.value + '", '
849851
else:

0 commit comments

Comments
 (0)