Swift Other
Clone or download
Permalink
Failed to load latest commit information.
.github [apollo-bot] Update the Templates with docs label (#227) Mar 14, 2018
Apollo.xcodeproj Remove shared StarWarsAPI scheme so Carthage doesn't bother building … Jul 19, 2018
Apollo.xcworkspace Add support for GraphQL subscriptions using the WebSocket transport (#… Apr 4, 2018
ApolloSQLite.xcodeproj Update dependencies and project configurations Jun 24, 2018
ApolloWebSocket.xcodeproj Remove manual targeted device setting in ApolloWebSocket (#338) Aug 5, 2018
Carthage/Checkouts Fix submodule dependencies Jun 24, 2018
Sources Fix "Ignoring import" warning with Cocoapods (#341) Aug 5, 2018
Tests 0.9.1 Jul 19, 2018
docs Update downloading-schema.md (#347) Aug 12, 2018
screenshots Update README and add some screenshots Oct 13, 2016
scripts Wrap argument for Apollo CLI version check in quotes (#335) Aug 2, 2018
.gitignore Don't use global installation of Apollo CLI (#326) Jul 29, 2018
.gitmodules Fix submodule dependencies Jun 24, 2018
.jazzy.yaml New async query execution model and batched normalized cache Mar 8, 2017
.swift-version Swift 4.0 Package Manager support (#164) Oct 17, 2017
.travis.yml Use Apollo CLI for codegen (#304) Jul 7, 2018
Apollo.podspec Use Apollo CLI for codegen (#304) Jul 7, 2018
CHANGELOG.md Update changelog with comment about switch to apollo-cli Jul 29, 2018
CONTRIBUTING.md Create CONTRIBUTING.md (#45) Jan 31, 2017
Cartfile Fix Starscream dependency submodule Jun 24, 2018
Cartfile.resolved Update dependencies May 9, 2018
DESIGN.md Remove outdated information in DESIGN.md and link to docs instead Oct 19, 2016
Framework.xcconfig Drop iOS 8 and loosen SQLite.swift version requirement (#98) Jun 19, 2017
LICENSE Update LICENSE Dec 1, 2017
Package.swift Swift 4.0 Package Manager support (#164) Oct 17, 2017
README.md Remove outdated installation instructions Mar 7, 2018
Version.xcconfig 0.9.2 Jul 29, 2018
renovate.json Remove renovate config from docs/package.json (#248) Apr 6, 2018

README.md

Apollo iOS

GitHub license Carthage compatible CocoaPods Get on Slack

Apollo iOS is a strongly-typed, caching GraphQL client for iOS, 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 however. 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.

This combination of models with value semantics, one way data flow, and automatic consistency management, leads to a very powerful and elegant programming model that allows you to eliminate common glue code and greatly simplifies app development.

Documentation

Read the full docs at apollographql.com/docs/ios/

Contributing

Build status

This project is being developed using Xcode 9 and Swift 4.

If you open Apollo.xcodeproj, you should be able to run the tests of the Apollo target.

Some of the tests run against a simple GraphQL server serving the Star Wars example schema (see installation instructions there).

If you'd like to contribute, please refer to the Apollo Contributor Guide.