Practical GraphQL for Android

by · Sep 30, 2016 · 146 views ·

Native mobile apps require a significant ongoing investment in building APIs. Most apps use REST style APIs that require matching client & server data models. Change is tedious and error-prone. Versioned endpoints must remain indefinitely. This leads to product stagnation and a resistance to evolving APIs to better suit product needs. GraphQL was designed specifically to address these issues. Facebook has used GraphQL since 2012 and it has proven to be a more productive paradigm than REST. GraphQL is an open specification that defines a declarative, compositional, strongly-typed language for data-fetching APIs. Facebook has released an open source reference implementation written in JavaScript. Community built open source libraries exist for Java, PHP, Python, Ruby, Go and more. This talk will walk through usage of GraphQL in an Android app. It will also briefly cover wrapping an existing REST API to provide a GraphQL endpoint using graphql-js. No previous GraphQL experience is expected.