Skip to content

Instantly share code, notes, and snippets.

@justinmakaila
Created May 1, 2017 18:49
Show Gist options
  • Save justinmakaila/c60ceef2658e9626679398ebb12c2e6f to your computer and use it in GitHub Desktop.
Save justinmakaila/c60ceef2658e9626679398ebb12c2e6f to your computer and use it in GitHub Desktop.
Lunar Initialization
import Apollo
import Lunar
let apollo: ApolloClient = {
let cache = try! LunarCache() /// try! since any failure would be considered catastrophic
let store = ApolloStore(cache: cache)
let networkTransport: NetworkTransport = // Set up your network
return ApolloClient(
networkTransport: networkTransport,
store: store
)
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment