![]() Null safety on fieldsĪpollo Kotlin generates models based on your project’s GraphQL operations and the type information found in the schema. Let’s look at a few ways the library deals with nullability. ![]() In fact, nullability is one of the key features of GraphQL, allowing API authors to clearly specify which fields of a type are nullable.Īs for Kotlin, the language supports nullability in its type system, significantly reducing the risk for errors – for example assigning a potentially null value to a non-nullable field won’t even compile!Īt the intersection of these two worlds lies Apollo Kotlin, the GraphQL typesafe client library for Kotlin. Mistake or not, null is here to stay and there are ways to coexist peacefully! ![]() The concept of null is sometimes called a “ billion dollar mistake”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |