From ac7f774b8da985bbe0596d1404564d9e89b86ceb Mon Sep 17 00:00:00 2001 From: Wojtek Trocki Date: Wed, 27 Feb 2019 21:00:51 +0000 Subject: [PATCH 1/3] fix: Remove fixed version from optimistic response --- packages/sync/src/cache/createOptimisticResponse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sync/src/cache/createOptimisticResponse.ts b/packages/sync/src/cache/createOptimisticResponse.ts index c72b20a7..94f6d2ea 100644 --- a/packages/sync/src/cache/createOptimisticResponse.ts +++ b/packages/sync/src/cache/createOptimisticResponse.ts @@ -50,7 +50,7 @@ export const createOptimisticResponse = optimisticResponse[operation] = { __typename: typeName, ...data, - version: 1, + optimisticResponse: true }; if (addId) { From 6e2108af9e9bb429d34d28e0ed74444c77606dba Mon Sep 17 00:00:00 2001 From: Wojciech Trocki Date: Thu, 28 Feb 2019 10:30:30 +0000 Subject: [PATCH 2/3] fix: remove invalid spac --- packages/sync/src/cache/createOptimisticResponse.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/sync/src/cache/createOptimisticResponse.ts b/packages/sync/src/cache/createOptimisticResponse.ts index 94f6d2ea..fd8adb8e 100644 --- a/packages/sync/src/cache/createOptimisticResponse.ts +++ b/packages/sync/src/cache/createOptimisticResponse.ts @@ -50,7 +50,6 @@ export const createOptimisticResponse = optimisticResponse[operation] = { __typename: typeName, ...data, - optimisticResponse: true }; if (addId) { From 70bfb0bb51c22c15fe29be3950bbd02e8c83df27 Mon Sep 17 00:00:00 2001 From: Wojciech Trocki Date: Thu, 28 Feb 2019 10:51:06 +0000 Subject: [PATCH 3/3] fix: add version to the tests --- packages/sync/integration_test/test/offline.test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/sync/integration_test/test/offline.test.js b/packages/sync/integration_test/test/offline.test.js index de307396..192351a0 100644 --- a/packages/sync/integration_test/test/offline.test.js +++ b/packages/sync/integration_test/test/offline.test.js @@ -32,7 +32,8 @@ describe('AeroGear Apollo GraphQL Voyager client', function () { const newTask = { description: 'new', - title: 'new' + title: 'new', + version: 1 }; const updatedTask = {