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

fix: Argument type only uses scalar and ignore list #327

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

flonou
Copy link

@flonou flonou commented Nov 15, 2024

This should fix #321
I'm not completely sure all GraphQL Types are correctly handled

I will check if I can provide tests for this if needed

Copy link

@normanre normanre left a comment

Choose a reason for hiding this comment

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

Hi,
i think you put up a neat solution. It seems like you did not get to run you code, because there would be a syntax error.

I commented a solution in the line with the error.

Furthermore, a similar problem which is fixed #347 is also missing here.

used_custom_scalar: Optional[str],
) -> None:
"""Accumulates return arguments."""
constant_value = f"{final_type.name}!" if is_required else final_type.name
constant_value = self._generate_complete_type_name(complete_type)

Choose a reason for hiding this comment

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

this would cause a syntax error. the variable complete_type does not seem to be defined. I think you can drop the parameter final_type and put your new parameter complete_type there, then in generate_arguments() you pass complete_type=arg_value.type to _accumulate_return_arguments().

Copy link
Author

Choose a reason for hiding this comment

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

Indeed I must have messed up with my git client. My local code is exactly what you describe. I'll push a new commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants