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

Generate default values of None for optional arguments #251

Closed
ghostdogpr opened this issue Feb 29, 2020 · 1 comment · Fixed by #254
Closed

Generate default values of None for optional arguments #251

ghostdogpr opened this issue Feb 29, 2020 · 1 comment · Fixed by #254
Labels
client GraphQL Client module enhancement New feature or request

Comments

@ghostdogpr
Copy link
Owner

Example of function generated with the Github API:

def repositories[A](
        affiliations: Option[List[Option[RepositoryAffiliation]]],
        after: Option[String],
        before: Option[String],
        first: Option[Int],
        isFork: Option[Boolean],
        isLocked: Option[Boolean],
        last: Option[Int],
        orderBy: Option[RepositoryOrder],
        ownerAffiliations: Option[List[Option[RepositoryAffiliation]]],
        privacy: Option[RepositoryPrivacy]
    )(
        innerSelection: SelectionBuilder[RepositoryConnection, A]
    ): SelectionBuilder[Organization, A] = ???

It is inconvenient to have to pass None for each of them. We could add = None when generating the code.

@ghostdogpr ghostdogpr added enhancement New feature or request client GraphQL Client module labels Feb 29, 2020
@kitlangton
Copy link
Contributor

I'm going to take a shot at this tomorrow morning :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client GraphQL Client module enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants