You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have recently come upon unexpected list coercion errors for [Enum] variable values.
The error occurs when the variable value is null for no input value for the enum list.
If I replace userType variable value to [] or [null], the error is gone. However, that will mean I am sending an empty list rather than a null which will impact resolver input value logic. I'd expect the null to be passed through and ignored in subgraph.
It seems that a null variable value for a [Enum] nullable input field does not work.
It does however work for [String], where I can provide a null variable value and it does not error.
Hi there,
I have recently come upon unexpected list coercion errors for [Enum] variable values.
The error occurs when the variable value is
null
for no input value for the enum list.Variables
This results to
If I replace userType variable value to
[]
or[null]
, the error is gone. However, that will mean I am sending an empty list rather than a null which will impact resolver input value logic. I'd expect the null to be passed through and ignored in subgraph.It seems that a null variable value for a [Enum] nullable input field does not work.
It does however work for [String], where I can provide a null variable value and it does not error.
The error is thrown in:
func (v *inputFieldDefaultInjectionVisitor) processObjectOrListInput(fieldType int, defaultValue []byte, typeDoc *ast.Document) ([]byte, bool, error)
The text was updated successfully, but these errors were encountered: