apollo-client
Advanced tools
Comparing version 2.4.3-local-state-alpha.7 to 2.4.3-local-state-alpha.8
@@ -841,3 +841,5 @@ var __assign = (this && this.__assign) || function () { | ||
_this.addFetchQueryPromise(requestId, resolve, reject); | ||
var subscription = obs.subscribe({ | ||
var complete = false; | ||
var handlingNext = false; | ||
var subscriber = { | ||
next: function (result) { return __awaiter(_this, void 0, void 0, function () { | ||
@@ -848,2 +850,3 @@ var updatedResult, lastRequestId, localResolver, localResult; | ||
case 0: | ||
handlingNext = true; | ||
updatedResult = result; | ||
@@ -904,2 +907,6 @@ lastRequestId = this.getQuery(queryId).lastRequestId; | ||
} | ||
handlingNext = false; | ||
if (complete) { | ||
subscriber.complete(); | ||
} | ||
return [2]; | ||
@@ -920,18 +927,22 @@ } | ||
complete: function () { | ||
_this.removeFetchQueryPromise(requestId); | ||
_this.setQuery(queryId, function (_a) { | ||
var subscriptions = _a.subscriptions; | ||
return ({ | ||
subscriptions: subscriptions.filter(function (x) { return x !== subscription; }), | ||
if (!handlingNext) { | ||
_this.removeFetchQueryPromise(requestId); | ||
_this.setQuery(queryId, function (_a) { | ||
var subscriptions = _a.subscriptions; | ||
return ({ | ||
subscriptions: subscriptions.filter(function (x) { return x !== subscription; }), | ||
}); | ||
}); | ||
}); | ||
resolve({ | ||
data: resultFromStore, | ||
errors: errorsFromStore, | ||
loading: false, | ||
networkStatus: NetworkStatus.ready, | ||
stale: false, | ||
}); | ||
resolve({ | ||
data: resultFromStore, | ||
errors: errorsFromStore, | ||
loading: false, | ||
networkStatus: NetworkStatus.ready, | ||
stale: false, | ||
}); | ||
} | ||
complete = true; | ||
}, | ||
}); | ||
}; | ||
var subscription = obs.subscribe(subscriber); | ||
_this.setQuery(queryId, function (_a) { | ||
@@ -938,0 +949,0 @@ var subscriptions = _a.subscriptions; |
{ | ||
"name": "apollo-client", | ||
"version": "2.4.3-local-state-alpha.7", | ||
"version": "2.4.3-local-state-alpha.8", | ||
"description": "A simple yet functional GraphQL client.", | ||
@@ -28,7 +28,7 @@ "main": "bundle.umd.js", | ||
"@types/zen-observable": "^0.8.0", | ||
"apollo-cache": "1.1.18-local-state-alpha.7", | ||
"apollo-cache": "1.1.18-local-state-alpha.8", | ||
"apollo-link": "^1.0.0", | ||
"apollo-link-dedup": "^1.0.0", | ||
"apollo-utilities": "1.0.22-local-state-alpha.7", | ||
"graphql-anywhere": "4.1.20-local-state-alpha.7", | ||
"apollo-utilities": "1.0.22-local-state-alpha.8", | ||
"graphql-anywhere": "4.1.20-local-state-alpha.8", | ||
"symbol-observable": "^1.0.2", | ||
@@ -35,0 +35,0 @@ "zen-observable": "^0.8.0" |
@@ -1,2 +0,2 @@ | ||
export declare const version = "2.4.3-local-state-alpha.7"; | ||
export declare const version = "2.4.3-local-state-alpha.8"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,1 +0,1 @@ | ||
exports.version = "2.4.3-local-state-alpha.7" | ||
exports.version = "2.4.3-local-state-alpha.8" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
506267
4888
+ Addedapollo-cache@1.1.18-local-state-alpha.8(transitive)
+ Addedapollo-utilities@1.0.22-local-state-alpha.8(transitive)
+ Addedgraphql-anywhere@4.1.20-local-state-alpha.8(transitive)
- Removedapollo-cache@1.1.18-local-state-alpha.7(transitive)
- Removedapollo-utilities@1.0.22-local-state-alpha.7(transitive)
- Removedgraphql-anywhere@4.1.20-local-state-alpha.7(transitive)