apollo-kotlin
作者: apollographql
Apollo Kotlin 是一個強型別的 GraphQL 客戶端,能從你的 GraphQL 操作和綱要中生成 Kotlin 模型,可用於 Android、JVM 和 Kotlin Multiplatform 專案。
npx skills add https://github.com/apollographql/skills --skill apollo-kotlinApollo 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
ApolloClientwith 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
- list-apollo-kotlin-versions.sh - List versions of Apollo Kotlin
- 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.
來自 apollographql 的更多技能
apollo-client
apollographql
Apollo Client 是一個全面的 JavaScript 狀態管理庫,讓您能透過 GraphQL 管理本地與遠端資料。4.x 版本帶來了改進的快取機制、更佳的 TypeScript 支援,以及 React 19 相容性。
official
apollo-client
apollographql
全面指南,涵蓋使用 Apollo Client 4.x 建構 React 應用程式,包含查詢、變更、快取及狀態管理。支援多種 React 框架與設定:客戶端應用程式(Vite、CRA)、搭配 React Server Components 的 Next.js App Router、支援串流 SSR 的 React Router 7,以及 TanStack Start。包含用於查詢(useQuery、useLazyQuery)、變更(useMutation)的鉤子,以及基於 Suspense 的模式(useSuspenseQuery、useBackgroundQuery),適用於現代 React 18+ 與 19...
official
apollo-connectors
apollographql
使用@source和@connect指令將REST API整合至GraphQL超級圖譜。提供結構化五步驟流程:研究API結構、使用指令實作綱要、透過rover supergraph compose驗證、執行連接器、測試覆蓋範圍。支援請求配置,包含標頭、請求主體、N+1模式批次處理,以及透過$env注入環境變數。處理回應映射,包含欄位選取、別名、巢狀資料子選取及實體...
official
apollo-federation
apollographql
Apollo Federation 可將多個 GraphQL API(子圖)組合成統一的超級圖表。
official
apollo-ios
apollographql
Apollo iOS 是一個專為 Apple 平台設計的強型別 GraphQL 客戶端。它能從你的 GraphQL 操作與 schema 生成 Swift 型別,並提供 async/await 客戶端、正規化快取(記憶體或 SQLite 支援)、可插拔的攔截器式 HTTP 傳輸(處理查詢、變更與多部分訂閱),以及可選的 WebSocket 傳輸(graphql-transport-ws),可承載任何操作類型。
official
apollo-mcp-server
apollographql
透過模型上下文協定將AI代理連接至GraphQL API,內建內省與操作工具。將GraphQL操作暴露為MCP工具;支援三種操作來源:本地檔案、GraphOS Studio集合與持久化查詢清單。提供四種內省工具(introspect、search、validate、execute)用於結構探索與臨時查詢測試;壓縮模式透過簡潔標記減少Token用量。可透過靜態標頭設定認證...
official
apollo-router
apollographql
Apollo Router 是一款以 Rust 編寫的高效能圖形路由器,用於執行 Apollo Federation 2 超級圖。它位於子圖前端,負責查詢規劃、執行與回應組合。
official
apollo-router-plugin-creator
apollographql
為 Apollo Router 建立原生 Rust 外掛程式。
official