apollo-kotlin

📁 apollographql/skills 📅 8 days ago
57
总安装量
57
周安装量
#3803
全站排名
安装命令
npx skills add https://github.com/apollographql/skills --skill apollo-kotlin

Agent 安装分布

claude-code 55
opencode 54
gemini-cli 52
github-copilot 51
codex 50
cursor 49

Skill 文档

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

Scripts

Key Rules

  • Use Apollo Kotlin v4+, do not use v3 or older versions.
  • Keep schema and operations in source control to make builds reproducible.