Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Added the Apollo iOS Client to the codebase to integrate with Uplift’s GraphQL backend.
Changes Made
Apollo
.graphql
files to generate the API.UpliftAPI
has been configured with theinternal
access modifier. Because I have configured it to be used directly within the target instead of a library, we will need to prependUpliftAPI.
(with the dot) to access anything generated by Apollo, which is nested inside of an enumeration calledUpliftAPI
.Networking
ApolloNetwork.swift
to contain code that accesses the Apollo Client.Publishers.swift
that extends thePublishers
class defined in the Combine framework.cachePolicy
: A cache policy that specifies when results should be fetched from the server and when data should be loaded from the local cache. Defaults to.default
.contextIdentifier?
: A unique identifier for this request, to help with deduping cache hits for watchers. Defaults tonil
.context?
: A context that is being passed through the request chain. Defaults tonil
.queue
: A dispatch queue on which the result handler will be called. Defaults to the main queue.publishResultToStore
: Iftrue
, this will publish the result returned from the operation to the cache store. Defaults totrue
. For mutations only.ApolloMutationSubscription
that processes the subscription that is received by the publishers.ApolloClientProtocol.swift
that extends theApolloClientProtocol
class defined in the Apollo and ApolloAPI libraries.Publishers.swift
.Other Changes
README.md
with the up-to-date instructions for setting up the codebase.AppDevAnnouncements
package because it is currently being refactored. See added// TODO
comments in the codebase.https://
prepended. To account for this, the current code removeshttps://
from the URL. The reason for this change is because we will be refactoring networking in the codebase soon.Test Coverage
Next Steps