Android Development with GraphQL
Article Summary
Efe Karasabun from Thumbtack reveals how GraphQL solved their biggest mobile API headaches. No more over-fetching data or coordinating breaking changes across teams.
Thumbtack's Android team adopted GraphQL with Apollo client to improve developer experience and app performance. This article walks through their practical implementation workflow, from schema design to auto-generated code, showing how GraphQL's strongly-typed schema catches bugs at compile-time instead of production.
Key Takeaways
- GraphQL eliminates over-fetching: clients request only the data they need
- Strongly-typed schema catches breaking changes at compile-time, not in production
- Apollo auto-generates Java classes from queries, removing manual model writing
- GraphiQL mocking lets Android devs build UI before server implementation exists
- No API versioning needed: deprecated fields maintain backward compatibility
GraphQL with Apollo transformed Thumbtack's Android workflow by preventing runtime bugs, reducing bandwidth waste, and enabling parallel client-server development through powerful mocking.
About This Article
Thumbtack's Android and web clients needed different data structures from the same endpoints. This meant the server sent a lot of extra information that wasn't needed, wasting bandwidth and draining batteries on mobile devices.
Thumbtack Engineering added Apollo GraphQL client to Android. Now clients can specify exactly which fields they need in their queries, and the server combines requests from multiple microservices into a single optimized response.
The strongly-typed GraphQL schema means client and server engineers don't have to coordinate manually anymore. Schema incompatibilities get caught at compile time, before code reaches production.