Input fields deriving from Enum are not properly nullified. The resulting str(mutation) (prettified):
mutation {
createUser(
user: {
firstName: "Jan"
lastName: "Kowalski"
middleName: null // <-- this is string field, nullified correctly
idType: None // <-- BUG HERE: no value given to an enum should result in "null" instead
idNumber: null
// … snip
}
) {
// … snip
}
}
Actual constructed values are None. It seems that the problem is in sgqlc.types.EnumMeta.__to_graphql_input__ which should check if value is None. This change fixed the problem for me
Input fields deriving from Enum are not properly nullified. The resulting
str(mutation)
(prettified):Relevant code:
Actual constructed values are
None
. It seems that the problem is insgqlc.types.EnumMeta.__to_graphql_input__
which should checkif value is None
. This change fixed the problem for me