diff --git a/packages/api-client-core/package.json b/packages/api-client-core/package.json index b4469435e..103f60d7d 100644 --- a/packages/api-client-core/package.json +++ b/packages/api-client-core/package.json @@ -1,6 +1,6 @@ { "name": "@gadgetinc/api-client-core", - "version": "0.15.34", + "version": "0.15.35", "files": [ "Readme.md", "dist/**/*" diff --git a/packages/api-client-core/src/graphql-live-query-utils/createApplyLiveQueryPatch.ts b/packages/api-client-core/src/graphql-live-query-utils/createApplyLiveQueryPatch.ts index 0e9a2fe48..f13451f50 100644 --- a/packages/api-client-core/src/graphql-live-query-utils/createApplyLiveQueryPatch.ts +++ b/packages/api-client-core/src/graphql-live-query-utils/createApplyLiveQueryPatch.ts @@ -38,12 +38,14 @@ export const createApplyLiveQueryPatch = const valueToPublish: ExecutionLivePatchResult = {}; if (next.value.revision === 1) { - if (!next.value.data) { + if (next.value.data !== undefined) { + valueToPublish.data = next.value.data; + + mutableData = next.value.data; + lastRevision = 1; + } else { throw new Error("Missing data."); } - valueToPublish.data = next.value.data; - mutableData = next.value.data; - lastRevision = 1; } else { if (!mutableData) { throw new Error("No previousData available.");