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

better handle list types #347

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matthew-emw
Copy link

where our GraphQL schema has a list field as follows:

accounts(
    # ...
    """sort the rows by one or more columns"""
    order_by: [accounts_order_by!]
    # ...
  )

we were observing generated code with non-list arguments like:

def accounts(
        cls,
        *,
        # ...
        order_by: Optional[accounts_order_by] = None,
        # ...
    )

this is pehaps related to issue #321 and PR #327.

my PR reworks this to result in:

def accounts(
        cls,
        *,
        # ...
        order_by: Optional[List[accounts_order_by]] = None,
        # ...
    )

i'd like to extend my PR with tests, but:

  • i see ArgumentGenerator is currently not covered by any tests
  • in custom_operations.py i see both an ArgumentsGenerator being injected and an ArgumentGenerator (no ess) being instantiated
  • does this imply a direction of travel and that ArgumentsGenerator should be used going forward?

i'd be grateful for any guidance. thanks!

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.

1 participant