Are the fields connected to datafetcher nullable? #423
-
|
In type Show {
id: Int!
title: String!
releaseYear: Int
reviews: [Review]
}In But what if type Show {
id: Int!
title: String!
releaseYear: Int
reviews: [Review]!
theater: Theater! # Or what if there is any mandatory field like this?
}Should I set it to nullable? |
Beta Was this translation helpful? Give feedback.
Answered by
paulbakker
Jun 29, 2021
Replies: 1 comment
-
|
In this case I would set the schema type to non-nullable, but make the Kotlin type nullable. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
joont92
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In this case I would set the schema type to non-nullable, but make the Kotlin type nullable.
If you're using codegen, you can use the
kotlinAllFieldsOptionalsetting to do so.