- Install Apollo
$ npm install -g apollo 2.21.0- Fetch Scheme & Generate API Code
cd ____ # project folder
apollo schema:download --endpoint=__________ ./schema.json # end point url / scheme.json location
apollo codegen:generate --target=swift --includes="$(find . -name '*.graphql')" --localSchemaFile=_______/schema.json _______/GraphQLAPI.swift # scheme.json location / generated API code location$ sh get_gql.sh- RxSwift (>= 5.0)
- apollo-ios (~> 0.20.0)
- Xcode 11.0
- Swift 5.1
- Using CocoaPods
pod 'RxApolloClient', '1.3.0'- Using [Swift Package Manager]
import PackageDescription
let package = Package(
name: "YourApp",
dependencies: [
.package(url: "https://github.com/OhKanghoon/RxApolloClient", from: "1.3.0")
]
)client.rx
.fetch(query:)client.rx
.watch(query:)client.rx
.perform(mutation:)client.rx
.upload(operation:, files:)client.rx
.subscribe(subscription:)OhKanghoon, ggaa96@naver.com
RxApolloClient is available under the MIT license. See the LICENSE file for more info.