relay-runtime 0.0.0-main-ba09a889 → 0.0.0-main-dce1a2ea
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/experimental.js +1 -1
- package/index.js +1 -1
- package/lib/store/OperationExecutor.js +5 -3
- package/package.json +1 -1
- package/store/OperationExecutor.js.flow +15 -3
package/experimental.js
CHANGED
package/index.js
CHANGED
|
@@ -179,7 +179,7 @@ var Executor = /*#__PURE__*/function () {
|
|
|
179
179
|
}
|
|
180
180
|
case 'loading_final':
|
|
181
181
|
{
|
|
182
|
-
activeState = this._pendingModulePayloadsCount > 0 ? 'active' : 'inactive';
|
|
182
|
+
activeState = this._pendingModulePayloadsCount > 0 || this._useExecTimeResolvers && !this._execTimeResolverResponseComplete ? 'active' : 'inactive';
|
|
183
183
|
break;
|
|
184
184
|
}
|
|
185
185
|
default:
|
|
@@ -374,8 +374,10 @@ var Executor = /*#__PURE__*/function () {
|
|
|
374
374
|
this._getPublishQueueAndSaveActor().commitPayload(this._operation, payload, this._updater);
|
|
375
375
|
_payloadFollowups.push(payload);
|
|
376
376
|
this._execTimeResolverResponseComplete = isFinal;
|
|
377
|
+
if (isFinal) {
|
|
378
|
+
this._updateActiveState();
|
|
379
|
+
}
|
|
377
380
|
}
|
|
378
|
-
this._processPayloadFollowups(_payloadFollowups);
|
|
379
381
|
}
|
|
380
382
|
if (incrementalResponses.length > 0) {
|
|
381
383
|
var _payloadFollowups2 = this._processIncrementalResponses(incrementalResponses);
|
|
@@ -619,7 +621,7 @@ var Executor = /*#__PURE__*/function () {
|
|
|
619
621
|
});
|
|
620
622
|
};
|
|
621
623
|
_proto._maybeCompleteSubscriptionOperationTracking = function _maybeCompleteSubscriptionOperationTracking() {
|
|
622
|
-
if (!this._isSubscriptionOperation && !(this._useExecTimeResolvers && this._execTimeResolverResponseComplete)) {
|
|
624
|
+
if (!this._isSubscriptionOperation && !(this._useExecTimeResolvers && this._execTimeResolverResponseComplete && this._state === 'loading_final')) {
|
|
623
625
|
return;
|
|
624
626
|
}
|
|
625
627
|
if (this._pendingModulePayloadsCount === 0 && this._incrementalPayloadsPending === false) {
|
package/package.json
CHANGED
|
@@ -323,7 +323,11 @@ class Executor<TMutation: MutationParameters> {
|
|
|
323
323
|
}
|
|
324
324
|
case 'loading_final': {
|
|
325
325
|
activeState =
|
|
326
|
-
this._pendingModulePayloadsCount > 0
|
|
326
|
+
this._pendingModulePayloadsCount > 0 ||
|
|
327
|
+
(this._useExecTimeResolvers &&
|
|
328
|
+
!this._execTimeResolverResponseComplete)
|
|
329
|
+
? 'active'
|
|
330
|
+
: 'inactive';
|
|
327
331
|
break;
|
|
328
332
|
}
|
|
329
333
|
default:
|
|
@@ -585,8 +589,12 @@ class Executor<TMutation: MutationParameters> {
|
|
|
585
589
|
);
|
|
586
590
|
payloadFollowups.push(payload);
|
|
587
591
|
this._execTimeResolverResponseComplete = isFinal;
|
|
592
|
+
if (isFinal) {
|
|
593
|
+
// Need to update the active state to mark the query as inactive,
|
|
594
|
+
// incase server payloads have completed
|
|
595
|
+
this._updateActiveState();
|
|
596
|
+
}
|
|
588
597
|
}
|
|
589
|
-
this._processPayloadFollowups(payloadFollowups);
|
|
590
598
|
}
|
|
591
599
|
|
|
592
600
|
if (incrementalResponses.length > 0) {
|
|
@@ -949,7 +957,11 @@ class Executor<TMutation: MutationParameters> {
|
|
|
949
957
|
_maybeCompleteSubscriptionOperationTracking() {
|
|
950
958
|
if (
|
|
951
959
|
!this._isSubscriptionOperation &&
|
|
952
|
-
!(
|
|
960
|
+
!(
|
|
961
|
+
this._useExecTimeResolvers &&
|
|
962
|
+
this._execTimeResolverResponseComplete &&
|
|
963
|
+
this._state === 'loading_final'
|
|
964
|
+
)
|
|
953
965
|
) {
|
|
954
966
|
return;
|
|
955
967
|
}
|