and runtime ◦ Alternative paradigm to REST i.e. client-side apps talking to backend servers CRUD: ◦ Retrieve -> GQL “Query” ◦ Create/Update/Delete -> GQL “Mutation” What even is it?
is heavy to compute (e.g. requires long running process) ◦ REST solution: ◦ GraphQL solution: blah.com/api/userlightweight/123 query { user(id: 123) { id name } } { data: { user : { id: 123, name: “Billy Big Braces” } } }
send less data over the wire. ◦ Ability to chain multiple calls into one. ◦ Ability to create complex queries dynamically. ◦ Clients don’t need to worry about API versioning. (A query should never become invalid)
or chaining multiple consecutive GET requests, where possible you should bundle those requests into a single GET.” - Google https://developer.android.com/training/efficient-downloads/efficient-network-access.html
schema requirements ◦ Compile time code generation of ViewModels ◦ Strict parsing of Response based on Request query ◦ Local DB hooks for Sqlite and Core Data ◦ All the benefits without any of the pain Future