From 0e4e6666ffe68eeae3bdd131ee8848aa65be0e96 Mon Sep 17 00:00:00 2001 From: Stephen Coady Date: Tue, 23 Jul 2019 14:29:03 +0100 Subject: [PATCH] breaking: rename offlineMutation -> offlineMutate --- packages/sync/src/ApolloOfflineClient.ts | 2 +- packages/sync/src/OfflineClient.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; }