> **apollo-kotlin** — skill 5 of 14 in [apollographql/skills](https://skillsdocs.com/apollographql/skills).
>
> Book (all skills, one file): https://skillsdocs.com/apollographql/skills.md
> Machine manifest: https://skillsdocs.com/apollographql/skills/.well-known/agent-skills/index.json
> Install the book: `npx skills add apollographql/skills`
> Upstream: https://github.com/apollographql/skills/blob/main/skills/apollo-kotlin/SKILL.md @ `main`
> Raw bytes, no header: https://raw.githubusercontent.com/apollographql/skills/main/skills/apollo-kotlin/SKILL.md
> Base for relative paths: https://raw.githubusercontent.com/apollographql/skills/main/skills/apollo-kotlin/
> Licence: MIT — https://spdx.org/licenses/MIT.html
>
> Bundled files (6), referenced from this skill's directory:
>   - `references/caching.md` — https://raw.githubusercontent.com/apollographql/skills/main/skills/apollo-kotlin/references/caching.md
>   - `references/migrating-from-4.md` — https://raw.githubusercontent.com/apollographql/skills/main/skills/apollo-kotlin/references/migrating-from-4.md
>   - `references/operations.md` — https://raw.githubusercontent.com/apollographql/skills/main/skills/apollo-kotlin/references/operations.md
>   - `references/setup.md` — https://raw.githubusercontent.com/apollographql/skills/main/skills/apollo-kotlin/references/setup.md
>   - `scripts/list-apollo-kotlin-normalized-cache-versions.sh` — https://raw.githubusercontent.com/apollographql/skills/main/skills/apollo-kotlin/scripts/list-apollo-kotlin-normalized-cache-versions.sh
>   - `scripts/list-apollo-kotlin-versions.sh` — https://raw.githubusercontent.com/apollographql/skills/main/skills/apollo-kotlin/scripts/list-apollo-kotlin-versions.sh
>
> Content © its authors, served unmodified. Takedown: https://github.com/DreambaseAI/skillsdocs/issues/new?labels=takedown&title=Takedown+request

<!-- Verbatim upstream SKILL.md follows, YAML frontmatter included. -->

---
name: apollo-kotlin
description: >
  Guide for building applications with Apollo Kotlin, the GraphQL client library for Android and Kotlin. Use this skill when:
  (1) setting up Apollo Kotlin in a Gradle project for Android, Kotlin/JVM, or KMP,
  (2) configuring schema download and codegen for GraphQL services,
  (3) configuring an `ApolloClient` with auth, interceptors, and caching,
  (4) writing queries, mutations, or subscriptions,
license: MIT
compatibility: JVM 8+, Kotlin 1.9+, Gradle 8+, Android/JVM/Kotlin Multiplatform projects.
metadata:
  author: apollographql
  version: "1.0.3"
allowed-tools: Bash(./gradlew:*) Bash(gradle:*) Bash(curl:*) Read Write Edit Glob Grep WebFetch
---

# Apollo Kotlin Guide

Apollo Kotlin is a strongly typed GraphQL client that generates Kotlin models from your GraphQL operations and schema, that can be used in Android, JVM, and Kotlin Multiplatform projects.

## Process

Follow this process when adding or working with Apollo Kotlin:

- [ ] Confirm target platforms (Android, JVM, KMP), GraphQL endpoint(s), and how schemas are sourced.
- [ ] Configure Gradle and code generation, including custom scalars
- [ ] Create a shared `ApolloClient` with auth, logging, and caching.
- [ ] Implement operations.
- [ ] Validate behavior with tests and error handling.


## Reference Files

- [Setup](references/setup.md) - Gradle plugin, schema download, codegen config (including scalars), client configuration (auth, logging, interceptors)
- [Operations](references/operations.md) - Queries, mutations, subscriptions, and how to execute them
- [Caching](references/caching.md) - Setup and use the normalized cache
- [Migration Guide](references/migrating-from-4.md) - Migrate from Apollo Kotlin 4

## Scripts

- [list-apollo-kotlin-versions.sh](scripts/list-apollo-kotlin-versions.sh) - List versions of Apollo Kotlin
- [list-apollo-kotlin-normalized-cache-versions.sh](scripts/list-apollo-kotlin-normalized-cache-versions.sh) - List versions of the Apollo Kotlin Normalized Cache library

## Key Rules

- Prefer Apollo Kotlin v5+. Do not use v3 or older versions.
- Keep schema and operations in source control to make builds reproducible.
