John O'Reilly
12/12/2024, 10:23 PMsomeList(id: ID!): [SomeType]
would translate to
public val someList: List<SomeType?>?
I understood that overall list could be nullable (and I guess something that `@notnull`could be used for) but didn't think for some reason that list element type would be nullable as welldorche
12/12/2024, 10:35 PM!
at the end of the type name to get what you expect
someList(id: ID!): [SomeType!]
I'm not really sure if there's a good usecase for having the double nullability ever tbh, we've generally managed to get our server devs to only use [Foo!]
and [Foo!]!
Edit:
I guess if you know you expect exactly N elements in a list it might make sense to return something like [foo, null, foo, null]
...
Error propagation will also differ as you'd be able to coerce an error for a single element into a null
entry in the listJohn O'Reilly
12/12/2024, 10:59 PMmbonnin
12/12/2024, 11:04 PMagrosner
12/13/2024, 11:44 AMmbonnin
12/13/2024, 11:55 AM