Skip to content

Instantly share code, notes, and snippets.

@alyssoncm
Created September 23, 2019 20:53
Show Gist options
  • Save alyssoncm/deab11a3301a1b0a33eb15e612cbf51e to your computer and use it in GitHub Desktop.
Save alyssoncm/deab11a3301a1b0a33eb15e612cbf51e to your computer and use it in GitHub Desktop.
apollo
import Apollo
// Apollo Client initialization.
// More about it here: https://www.back4app.com/docs/ios/swift-graphql
let apollo: ApolloClient = {
let configuration = URLSessionConfiguration.default
configuration.httpAdditionalHeaders = [
"X-Parse-Application-Id": "YourAppIdHere",
"X-Parse-Client-Key": "YourClientKeyHere"
]
let url = URL(string: "https://parseapi.back4app.com/graphql")!
return ApolloClient(
networkTransport: HTTPNetworkTransport(
url: url,
configuration: configuration
)
)
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment