Skip to content

mattfaluotico/apollo-ios

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apollo iOS

Apollo iOS is a GraphQL client for iOS, written in Swift.

Although JSON responses are convenient to work with in dynamic languages like JavaScript, dealing with dictionaries and untyped values is a pain in statically typed languages such as Swift.

The main design goal of the current version of Apollo iOS is therefore to return typed results for GraphQL queries. Instead of passing around dictionaries and making clients cast field values to the right type manually, the types returned allow you to access data and navigate relationships using the appropriate native types directly.

These result types are generated from a GraphQL schema and a set of query documents by apollo-codegen. It currently only generates code for a subset of GraphQL queries. Most importantly, fragments and mutations are not yet supported.

For more details on the proposed mapping from GraphQL results to Swift types, see the design docs.

Getting Started

Apollo iOS Quickstart is a sample Xcode project that makes it easy to get started with a generated API for your own schema and queries.

Development

The project is being developed using Xcode 8 and Swift 3.

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

Some of the tests run against an example GraphQL server (see installation instructions there) using the Star Wars data bundled with Facebook's reference implementation, GraphQL.js.

About

A GraphQL client for iOS, written in Swift

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 97.3%
  • Objective-C 2.7%