diff --git a/packages/sync/src/ApolloOfflineClient.ts b/packages/sync/src/ApolloOfflineClient.ts index be276d86..9168369c 100644 --- a/packages/sync/src/ApolloOfflineClient.ts +++ b/packages/sync/src/ApolloOfflineClient.ts @@ -28,7 +28,7 @@ export interface ApolloOfflineClient extends ApolloClient * Allows the client to perform an offline mutation * @param options the mutation helper options used to build the offline mutation */ - offlineMutation( + offlineMutate( options: MutationHelperOptions): Promise>; } diff --git a/packages/sync/src/OfflineClient.ts b/packages/sync/src/OfflineClient.ts index 07210f83..afd915f3 100644 --- a/packages/sync/src/OfflineClient.ts +++ b/packages/sync/src/OfflineClient.ts @@ -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( + public offlineMutate( options: MutationHelperOptions): Promise> { if (!this.apolloClient) { throw new Error("Apollo offline client not initialised before mutation called."); @@ -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; }