graphene
graphene copied to clipboard
Default value for Argument's should be Undefined
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.
@ewhauser is this still an issue? (sorry I haven't been paying attention to this part of the library)
AFAIK - yes. However, we are still on graphene-3.0b3
so it is possible the behavior was corrected since then.
Ok well if it is then a PR to fix it would be appreciated
I'm having the same issue with 3.0.0b7
Fixed: https://github.com/graphql-python/graphene/commit/19ebf08339263f0446235ddffbbab0e6d3f11699