Skip to content

Default value for Argument's should be Undefined #1195

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

Closed
ewhauser opened this issue May 2, 2020 · 5 comments
Closed

Default value for Argument's should be Undefined #1195

ewhauser opened this issue May 2, 2020 · 5 comments

Comments

@ewhauser
Copy link

ewhauser commented May 2, 2020

When upgrading from 2 to 3, the default value of Argument's has changed from undefined to none which changes the schema. An example from test_relay_connection:

type Query {
  letters(before: String = null, after: String = null, first: Int = null, last: Int = null): LetterConnection
  connectionLetters(before: String = null, after: String = null, first: Int = null, last: Int = null): LetterConnection
  asyncLetters(before: String = null, after: String = null, first: Int = null, last: Int = null): LetterConnection
  node(
    """The ID of the object"""
    id: ID!
  ): Node
}

which should be:

type Query {
  letters(before: String, after: String, first: Int, last: Int): LetterConnection
  connectionLetters(before: String, after: String, first: Int, last: Int): LetterConnection
  asyncLetters(before: String, after: String, first: Int, last: Int): LetterConnection
  node(
    """The ID of the object"""
    id: ID!
  ): Node
}

Happy to submit a PR to fix if this is not intended behavior.

@stale stale bot added the wontfix label Aug 1, 2020
@jkimbo
Copy link
Member

jkimbo commented Aug 5, 2020

@ewhauser is this still an issue? (sorry I haven't been paying attention to this part of the library)

@stale stale bot removed the wontfix label Aug 5, 2020
@graphql-python graphql-python deleted a comment from stale bot Aug 5, 2020
@ewhauser
Copy link
Author

ewhauser commented Aug 5, 2020

AFAIK - yes. However, we are still on graphene-3.0b3 so it is possible the behavior was corrected since then.

@jkimbo
Copy link
Member

jkimbo commented Aug 5, 2020

Ok well if it is then a PR to fix it would be appreciated

@lovetoburnswhen
Copy link

I'm having the same issue with 3.0.0b7

@erikwrede
Copy link
Member

Fixed: 19ebf08

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 a pull request may close this issue.

4 participants