Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
maaft committed Mar 19, 2021
1 parent 9c74449 commit aed08db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sgqlc/codegen/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def format_selection_set_inline_fragment(self, parent, type_condition,
children, lines, idx):
sel = self.selection_name(parent, '_as__%s' % type_condition, idx)
idx += 1
lines.append('%s = %s.__as__(%s)' % (sel, parent, type_condition))
lines.append('%s = %s.__as__(%s)' % (sel, parent, str(self.schema_name) + "." + type_condition))
return self.format_selection_set(sel, children, lines, idx)

@staticmethod
Expand Down Expand Up @@ -456,9 +456,9 @@ def validate_required_arguments(self, node):
if a['type']['kind'] == 'NON_NULL' and a['defaultValue'] is None:
required.add(a['name'])

for _, var in node.arguments:
if var.name in required:
required.remove(var.name)
for name, _ in node.arguments:
if name in required:
required.remove(name)

if required:
raise ValueError(
Expand Down

0 comments on commit aed08db

Please sign in to comment.