apollo-kotlin

Configure Apollo Kotlin in Gradle projects and implement GraphQL operations.

102|12|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/apollographql/skills --skill apollo-kotlin-apollographql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apollo-kotlin
Source: https://github.com/apollographql/skills/tree/main/skills/apollo-kotlin
Command: npx skills add https://github.com/apollographql/skills --skill apollo-kotlin-apollographql

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the process of integrating GraphQL APIs into Kotlin and Android applications by providing guidance on setting up and using the Apollo Kotlin client library.

Core Features & Use Cases

  • Project Setup: Configure Apollo Kotlin within Gradle for Android, JVM, or KMP projects.
  • Code Generation: Automate the generation of Kotlin models from GraphQL schemas and operations.
  • Client Configuration: Set up an ApolloClient with authentication, interceptors, and caching strategies.
  • Operation Implementation: Write and execute GraphQL queries, mutations, and subscriptions.
  • Use Case: You are starting a new Android project that needs to communicate with a GraphQL backend. Use this Skill to set up Apollo Kotlin, configure schema downloads, and implement your first GraphQL query.

Quick Start

Use the apollo-kotlin skill to set up Apollo Kotlin in a Gradle project for Android.

Frequently Asked Questions about apollo-kotlin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a GraphQL client in an Android Kotlin project?

To set up a GraphQL client in an Android Kotlin project, configure Apollo Kotlin in your Gradle build files, set up schema download, and initialize an ApolloClient with your endpoint. This automates model generation and handles data fetching operations.

Can I use Apollo Kotlin for Kotlin Multiplatform (KMP) projects?

Yes, Apollo Kotlin supports Kotlin Multiplatform (KMP) projects. You can configure the Apollo Gradle plugin to generate Kotlin models from your GraphQL schema that work across Android, Kotlin/JVM, and other KMP targets.

How does codegen work for GraphQL schemas in Kotlin?

Codegen for GraphQL schemas in Kotlin automates the generation of strongly typed Kotlin models from your GraphQL operations and schema. Apollo Kotlin handles this during the Gradle build process to ensure type safety in your data fetching.

How do I configure authentication and caching for a GraphQL ApolloClient?

You configure authentication and caching for an ApolloClient by adding interceptors for auth headers and defining a cache strategy during initialization. Apollo Kotlin provides built-in support to manage normalized cache and authenticated data fetching.

Does Apollo Kotlin support real-time data through GraphQL subscriptions?

Yes, Apollo Kotlin supports real-time data through GraphQL subscriptions. You can implement subscription operations within your application to maintain a persistent connection and receive live updates from your GraphQL backend.

What is the best way to integrate a GraphQL backend with a new Android app?

The best way to integrate a GraphQL backend with a new Android app is using Apollo Kotlin to manage data fetching. It provides Gradle project setup, automated code generation for type-safe models, and client configuration for queries and mutations.