Apollo-android: Can't pass `null` as parameter when a nullable array of non-null enums is expected

Created on 15 Dec 2020  路  1Comment  路  Source: apollographql/apollo-android

Apollo 2.4.6 with generateKotlinModels.set(true)

schema:

type Query {
  foo(enumParam: [AnEnum!]): String
}
enum AnEnum {
  A, B, C
}

query:

query Foo {
  foo(enumParam: null)
}

This results in the following error when generating code:

Failed to parse GraphQL file (...)/Repro.graphql (15:23)
Can't parse `Array` value, expected array
----------------------------------------------------
[14]:query Foo {
[15]:  foo(enumParam: null)
[16]:}
----------------------------------------------------
Bug

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings