Introduction to GraphQL — Part 2

Implementing GraphQL on Android and Kotlin Multiplatform using Apollo Kotlin Client version 4

Ryan W
14 min readAug 23, 2024

--

This image was created using an AI image creation program.

In the previous part of this series, we explored the fundamental differences between REST APIs and GraphQL.

With a solid understanding of these differences, it’s time to dive into the practicalities of integrating GraphQL into our Android or Kotlin Multiplatform projects.

Leveraging Existing Tools: Retrofit and Ktor vs. GraphQL Clients

For those already familiar with REST APIs, tools like Retrofit and Ktor are staple choices for managing network communications in Android and Kotlin Multiplatform projects. However, when shifting to GraphQL, we may wonder: do we need an entirely new set of tools, or can we build on what we already know?

The answer lies in understanding the roles of the server and client in a GraphQL setup:

  • Server-Side: The server defines the GraphQL schema, acting as a contract that…

--

--

Ryan W
Ryan W

Written by Ryan W

Modern Android Development | Jetpack Compose | Kotlin Multiplatform 📱Creating Android Solutions From Concept to Product | Building Apps That Matter Since 2010