When we’re working in typed languages, we have to write our own object types and models, and when we get JSON from a REST API, we have to convert the data into our types. With GraphQL, we know the types for everything because they’re in the schema. Which means that our client libraries can provide us with type definitions or generate typed model code for us. For instance, [`apollo-codegen`](https://github.com/apollographql/apollo-codegen) generates type definitions for Typescript, Flow, and Scala, [Apollo iOS](https://www.apollographql.com/docs/ios/) returns query-specific Swift types, and [Apollo-Android](https://github.com/apollographql/apollo-android) generates typed Java models based on our queries and schema.
0 commit comments