
apollographql/apollo-ios
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
📱 Swiftで書かれたiOS用の強力型キャッシュ型GraphQLクライアントです。
概要
Apollo iOS Apollo iOSは強力なキャッシュ、堅牢なコード生成、直感的なAPIを提供し、アプリ開発を加速させます。 ✅ - インテリジェントなインメモリまたはSQLiteを箱からすぐに✅提供 - ネットワーク応答のための手書きモデルの時代は終わりました!✅- ユーザーを「成功の淵」へと導き、デフォルト✅で良い実践を促す- 世界中の数百万のエンドユーザーにサービスを提供する無数のアプリを支える ApolloClientを使用するアプリケーション内のターゲットは、Apollo製品に依存している必要があります。 Apollo生成モデルのみを使用するターゲットは、Apollo製品にリンクする必要はありません。 * - Q&Aとディスカッション * - コミュニティとのリアルタイムチャット 包括的なAPIオーケストレーションツール群を活用して、明日のロードマップを今日お届けします。 * - AfQL搭載のオンデバイスキャッシュを備えた型安全なアプリ(React、iOS、Kotlin) * - すべてのGraphQLおよびREST APIを1つのGraphQLエンドポイントにまとめる * - AIはAPIを必要とします。
概要(AI 翻訳)
Apollo iOSは、Swiftで書かれた強型キャッシュ型のGraphQLクライアントです。
GraphQLサーバーに対してクエリやミューテーションを実行し、結果をクエリ固有のSwift型として返します。つまり、JSONの解析や辞書のやり取り、クライアントに手動で正しい型に値をキャストさせる手間が不要です。また、モデル型はUIが使うGraphQL定義から生成されるため、自分で書く必要もありません。
生成される型はクエリごとに異なるため、クエリの一部として実際に指定したデータのみにアクセスできます。フィールドを指定しなければ、対応するプロパティにアクセスできません。つまり、Swiftのタイプチェッカーを使って、データアクセスのエラーがコンパイル時に必ず現れるか確認できるということです。Xcodeとの連携により、UIコードと対応するGraphQL定義を並べて操作でき、クエリドキュメントの検証やインラインのエラー表示も可能です。
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Apollo iOS is a strongly-typed, caching GraphQL client, written in Swift.
It allows you to execute queries and mutations against a GraphQL server, and returns results as query-specific Swift types. This means you don’t have to deal with parsing JSON, or passing around dictionaries and making clients cast values to the right type manually. You also don’t have to write model types yourself, because these are generated from the GraphQL definitions your UI uses.
As the generated types are query-specific, you’re only able to access data you actually specify as part of a query. If you don’t ask for a field, you won’t be able to access the corresponding property. In effect, this means you can now rely on the Swift type checker to make sure errors in data access show up at compile time. With our Xcode integration, you can conveniently work with your UI code and corresponding GraphQL definitions side by side, and it will even validate your query documents, and show errors inline.
Apollo iOS does more than simply run your queries against a GraphQL server: It normalizes query results to construct a client-side cache of your data, which is kept up to date as further queries and mutations are run. This means your UI is always internally consistent, and can be kept fully up-to-date with the state on the server with the minimum number of queries required.
推奨ツール
別のキーワードを試すか、フィルタを外してください。
インストール
npx skillfish add apollographql/apollo-ios