-
Notifications
You must be signed in to change notification settings - Fork 749
Closed
Labels
Description
Summary
We have a schema that contains
input InputArrayTypeOne {
id: ID!
//other properties
}
input InputArrayTypeTwo {
id: ID!
//other properties
}
input InputType {
id: ID
inputsOne: [InputArrayTypeOne]
inputsTwo: [InputArrayTypeTwo!]
}
And when we codegen this in apollo 2.0 alpha 2 we get the following error when compiling:
Cannot convert value of type 'GraphQLNullable<[InputArrayTypeOne?]>' to expected dictionary value type 'any GraphQLOperationVariableValue' . However, it seems like InputArrayTypeTwo works fine. I presume the problem is the nullability of the type within the array. Not sure if an optional type needs to be able to adhere to GraphQLOperationVariableValue directly, or if that type needs to be wrapped in it's own GraphQL nullable.
Version
2.0.0-alpha-2
Steps to reproduce the behavior
Create a schema that contains an array which can contain null values.
Codegen.
Compile generated code.
Logs
Anything else?
No response