Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #415 from aerogear/offlineMutate
Browse files Browse the repository at this point in the history
breaking: rename offlineMutation -> offlineMutate
  • Loading branch information
StephenCoady authored Jul 23, 2019
2 parents 288c5f6 + 0e4e666 commit 217b159
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/sync/src/ApolloOfflineClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface ApolloOfflineClient extends ApolloClient<NormalizedCacheObject>
* Allows the client to perform an offline mutation
* @param options the mutation helper options used to build the offline mutation
*/
offlineMutation<T = any, TVariables = OperationVariables>(
offlineMutate<T = any, TVariables = OperationVariables>(
options: MutationHelperOptions<T, TVariables>): Promise<FetchResult<T>>;

}
4 changes: 2 additions & 2 deletions packages/sync/src/OfflineClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class OfflineClient implements ListenerProvider {
* this offline friendly function to handle the optimistic UI and cache updates.
* @param options the MutationHelperOptions to create the mutation
*/
public offlineMutation<T = any, TVariables = OperationVariables>(
public offlineMutate<T = any, TVariables = OperationVariables>(
options: MutationHelperOptions<T, TVariables>): Promise<FetchResult<T>> {
if (!this.apolloClient) {
throw new Error("Apollo offline client not initialised before mutation called.");
Expand All @@ -110,7 +110,7 @@ export class OfflineClient implements ListenerProvider {
protected decorateApolloClient(apolloClient: any): ApolloOfflineClient {
apolloClient.offlineStore = this.offlineStore;
apolloClient.registerOfflineEventListener = this.registerOfflineEventListener.bind(this);
apolloClient.offlineMutation = this.offlineMutation.bind(this);
apolloClient.offlineMutate = this.offlineMutate.bind(this);
return apolloClient;
}

Expand Down

0 comments on commit 217b159

Please sign in to comment.