All skills
apollographql avatar

/apollo-kotlin

@93b90fd official
by Apollo GraphQLapollographql/skills115 stars
13

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,

Use this Skill: https://skilld.dev/gh/apollographql/skills/apollo-kotlin

This session only. Nothing lands on disk.

SKILL.md

≈102 tokens always: the name and description. ≈372 when used: this file. ≈2.4k more on demand in 4 files.

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 - Gradle plugin, schema download, codegen config (including scalars), client configuration (auth, logging, interceptors)
  • Operations - Queries, mutations, subscriptions, and how to execute them
  • Caching - Setup and use the normalized cache
  • Migration Guide - Migrate from Apollo Kotlin 4

Scripts

Key Rules

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

Source: SKILL.md on GitHub

1 alert16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides a comprehensive guide and supporting scripts for integrating Apollo Kotlin into Android, JVM, and Kotlin Multiplatform projects. All external resources, scripts, and dependencies are sourced from the official Apollo GraphQL organization or well-known services like GitHub.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    5/6 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 93b90fd. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
What it can do
Runs commands
compatibility
JVM 8+, Kotlin 1.9+, Gradle 8+, Android/JVM/Kotlin Multiplatform projects.
metadata
{
  "author": "apollographql",
  "version": "1.0.3"
}
All 1 allowed tools
Bash(./gradlew:*) Bash(gradle:*) Bash(curl:*) Read Write Edit Glob Grep WebFetch
  • apollo
  • graphql
  • kotlin
  • android
  • gradle
  • codegen
  • kmp
  • jvm
  • client

README badge

README badge for apollographql/skills/apollo-kotlin

Instructs an AI agent on setting up and using Apollo Kotlin, the strongly typed GraphQL client for Android, JVM, and Kotlin Multiplatform projects. Covers Gradle configuration, schema codegen, ApolloClient setup with auth and caching, and writing GraphQL operations. Targets Apollo Kotlin v5+ projects.

Generated from the current SKILL.md.

Does this skill work with Android, JVM, and Kotlin Multiplatform projects?
Yes. Apollo Kotlin supports Android, JVM, and Kotlin Multiplatform (KMP) projects. It requires JVM 8+, Kotlin 1.9+, and Gradle 8+.
What version of Apollo Kotlin should I use?
Use Apollo Kotlin v5 or later. The skill includes a migration guide from v4 but does not support v3 or older versions.
Can this skill help with schema download and code generation?
Yes. The skill covers Gradle plugin setup, schema download configuration, and code generation including custom scalar types.
Does this cover authentication and caching?
Yes. The skill includes guidance on configuring ApolloClient with auth, interceptors, and setting up the normalized cache.
Can I use this skill for queries, mutations, and subscriptions?
Yes. The skill covers implementing and executing queries, mutations, and subscriptions in Apollo Kotlin.

Generated from the current SKILL.md. These answers refresh after source changes.