Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closes #132,#133 #134

Closed
wants to merge 3 commits into from
Closed

closes #132,#133 #134

wants to merge 3 commits into from

Conversation

maaft
Copy link

@maaft maaft commented Mar 19, 2021

No description provided.

@coveralls
Copy link

coveralls commented Mar 19, 2021

Pull Request Test Coverage Report for Build 187

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 174: 0.0%
Covered Lines: 1466
Relevant Lines: 1466

💛 - Coveralls

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you check if this works with variables? See this fix I had to do sometime ago in a similar code e4a22f4

I'd suggest to keep the old behavior if it's a variable, then: name, maybe_var and you check hasattr(maybe_var, 'name') to use it overriding name

@@ -262,7 +262,9 @@ 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))
full_type_condition = str(self.schema_name) + "." + type_condition
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use format_type_usage() instead, I don't think we should need the wrapper version, but that would be a declaration error, on our side (code generation), we better use it to keep consistent.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so I understand you correctly: You suggest to use another format_type_usage() instead, e.g. format_type_condition()?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a method called self.format_type_usage(typ) that will handle the schema name prefix.

@barbieri
Copy link
Member

Hi @maaft , thanks for your patches.

I'm bit picky with the commits and git history, so I'd kindly ask for you to create 2 commits, one with the fix to #132 and another for #133. They should be in the same PR, but only 2 commits, each already incorporating the style fixes.

For #132, I have a suggestion to use format_type_usage(), but it's minor.

However for #133, I think we need to cope with both cases... I thought I fixed it... and I did, but I forgot to merge, see #126 :-( my bad

@barbieri
Copy link
Member

@maaft sorry about the inconvenience, #126 is now merged. You just have to address the other bit #132

@barbieri
Copy link
Member

also, please git-rebase on the newest master

@barbieri
Copy link
Member

barbieri commented Jun 2, 2021

closing this one as it was fixed in b208ca6

please reopen if something is still missing

@barbieri barbieri closed this Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants