Using com.apollographql.apollo is it normal to hav...
# graphql
a
Using com.apollographql.apollo is it normal to have a large chain of nullable values in the response? Assuming the query is valid it seems like many of the generated values should be nonnull.
m
It largely depends your schema. If your schema defines fields as nullable then the generated models will contain nullable fields as well.
a
This is the github v4 api. It looks like it defines them as nullable but most seem unnecessary to me. For example a ProjectConnection type says nodes are nullable but if there are none the count would just be zero. And if there any, the entries themselves are nullable so you get back a non-empty list but still have possible null values at each index.
m
Yep, I've seen that too. Not sure why people don't mark fields as non-nullable
a
another odd one was the databaseId field is nullable which would imply objects normally accessable via v3 rest api could sometimes not have an ID