https://kotlinlang.org logo
#apollo-kotlin
Title
# apollo-kotlin
m

Matt Thompson

07/13/2022, 4:59 PM
hello I’m just trying out the
@nonnull
directive and the docs seem to indicate that using it on a collection should make both the
List
and its type non-null, but what I am currently getting is a non-null list of a nullable type, i.e.
items: [Item]
->
val items : List<Item?>
. anything I’m missing?
b

bod

07/13/2022, 5:09 PM
HI! Are you referring to this doc? I think it is incorrect indeed!
There are ongoing talks in the GraphQL specification to allow this in a standard way - but it's still early and Apollo Kotlin doesn't support it for now. We also have this ticket for a similar idea of doing this.
m

Matt Thompson

07/13/2022, 5:19 PM
Yep that was the example I was referring to. Thanks for clarifying!
👍 1
b

bod

07/13/2022, 5:20 PM
I'll fix the misleading doc 🙂
5 Views