Millions of events per minute: we’ll count you as well!
February 22, 2017
Dependencies in component web done right
February 28, 2017

REST in Peace

Speaker: Nikolas Burk

Stream: «Mobicode»


REST is the de facto standard for API design nowadays – however, it actually has a number of shortcomings in flexibility and performance. For example, it usually requires multiple roundtrips between client and server to fetch data that goes over one or more relations in the data model. Adjusting the API on the other hand requires a lot of overhead from the backend engineers and is time consuming and error-prone.

In 2015, Facebook introduced a new API design paradigm called GraphQL as an alternative to REST – responding to the need making the data transfer in their mobile apps more efficient. It allows the client developer to specify arbitrary data requirements upon every API request, omitting the need for backend developers to adjust the API just because the client might need different data for a specific screen. Data that would have required a huge number of API calls to be fully available in the client now can be fetched with a single request.

This talk introduces the basic functionality of GraphQL as well as the Apollo Client, which is an iOS framework written in Swift that handles data fetching and mutations against a GraphQL backend. The Apollo Client leverages Swift’s static type system by generating the Swift types that correspond to your data requirements at compile time. It also features a normalized cache of the server responses that allows for automatic UI updates.