relay-runtime 11.0.1 → 11.0.2
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/index.js +1 -1
- package/index.js.flow +4 -2
- package/lib/handlers/RelayDefaultHandlerProvider.js +1 -1
- package/lib/handlers/connection/ConnectionHandler.js +1 -1
- package/lib/handlers/connection/MutationHandlers.js +1 -1
- package/lib/multi-actor-environment/ActorIdentifier.js +23 -0
- package/lib/multi-actor-environment/ActorSpecificEnvironment.js +108 -0
- package/lib/multi-actor-environment/MultiActorEnvironment.js +156 -0
- package/lib/multi-actor-environment/MultiActorEnvironmentTypes.js +11 -0
- package/lib/multi-actor-environment/index.js +17 -0
- package/lib/mutations/RelayRecordProxy.js +1 -1
- package/lib/mutations/RelayRecordSourceMutator.js +1 -1
- package/lib/mutations/RelayRecordSourceProxy.js +1 -1
- package/lib/mutations/RelayRecordSourceSelectorProxy.js +1 -1
- package/lib/mutations/applyOptimisticMutation.js +1 -1
- package/lib/mutations/commitMutation.js +1 -1
- package/lib/network/RelayNetwork.js +1 -1
- package/lib/network/RelayQueryResponseCache.js +1 -1
- package/lib/query/GraphQLTag.js +1 -1
- package/lib/query/fetchQuery.js +1 -1
- package/lib/query/fetchQueryInternal.js +1 -1
- package/lib/store/DataChecker.js +1 -1
- package/lib/store/{RelayModernQueryExecutor.js → OperationExecutor.js} +81 -37
- package/lib/store/RelayConcreteVariables.js +1 -1
- package/lib/store/RelayModernEnvironment.js +99 -144
- package/lib/store/RelayModernFragmentSpecResolver.js +1 -1
- package/lib/store/RelayModernRecord.js +1 -1
- package/lib/store/RelayModernSelector.js +1 -1
- package/lib/store/RelayModernStore.js +1 -6
- package/lib/store/RelayOperationTracker.js +1 -1
- package/lib/store/RelayPublishQueue.js +9 -5
- package/lib/store/RelayReader.js +63 -10
- package/lib/store/RelayReferenceMarker.js +1 -1
- package/lib/store/RelayResponseNormalizer.js +47 -22
- package/lib/store/RelayStoreReactFlightUtils.js +1 -1
- package/lib/store/RelayStoreUtils.js +1 -1
- package/lib/store/ResolverFragments.js +57 -0
- package/lib/store/cloneRelayHandleSourceField.js +1 -1
- package/lib/store/cloneRelayScalarHandleSourceField.js +1 -1
- package/lib/store/createRelayContext.js +1 -1
- package/lib/store/readInlineData.js +1 -1
- package/lib/subscription/requestSubscription.js +18 -7
- package/lib/util/RelayConcreteNode.js +1 -0
- package/lib/util/RelayFeatureFlags.js +3 -1
- package/lib/util/RelayProfiler.js +17 -187
- package/lib/util/RelayReplaySubject.js +1 -1
- package/lib/util/getRelayHandleKey.js +1 -1
- package/lib/util/getRequestIdentifier.js +1 -1
- package/multi-actor-environment/ActorIdentifier.js.flow +27 -0
- package/multi-actor-environment/ActorSpecificEnvironment.js.flow +189 -0
- package/multi-actor-environment/MultiActorEnvironment.js.flow +233 -0
- package/multi-actor-environment/MultiActorEnvironmentTypes.js.flow +196 -0
- package/multi-actor-environment/index.js.flow +24 -0
- package/network/RelayNetworkTypes.js.flow +5 -4
- package/package.json +3 -2
- package/relay-runtime.js +2 -2
- package/relay-runtime.min.js +2 -2
- package/store/{RelayModernQueryExecutor.js.flow → OperationExecutor.js.flow} +82 -35
- package/store/RelayModernEnvironment.js.flow +88 -131
- package/store/RelayModernStore.js.flow +0 -5
- package/store/RelayPublishQueue.js.flow +7 -4
- package/store/RelayReader.js.flow +57 -5
- package/store/RelayResponseNormalizer.js.flow +67 -26
- package/store/RelayStoreTypes.js.flow +15 -8
- package/store/ResolverFragments.js.flow +125 -0
- package/subscription/requestSubscription.js.flow +15 -7
- package/util/ReaderNode.js.flow +14 -1
- package/util/RelayConcreteNode.js.flow +1 -0
- package/util/RelayFeatureFlags.js.flow +4 -0
- package/util/RelayProfiler.js.flow +22 -194
- package/util/RelayRuntimeTypes.js.flow +3 -1
package/index.js
CHANGED
package/index.js.flow
CHANGED
|
@@ -110,10 +110,11 @@ export type {
|
|
|
110
110
|
Subscription,
|
|
111
111
|
} from './network/RelayObservable';
|
|
112
112
|
export type {GraphQLTaggedNode} from './query/GraphQLTag';
|
|
113
|
+
export type {TaskScheduler} from './store/OperationExecutor';
|
|
113
114
|
export type {EnvironmentConfig} from './store/RelayModernEnvironment';
|
|
114
|
-
export type {TaskScheduler} from './store/RelayModernQueryExecutor';
|
|
115
115
|
export type {RecordState} from './store/RelayRecordState';
|
|
116
116
|
export type {
|
|
117
|
+
ExecuteMutationConfig,
|
|
117
118
|
FragmentMap,
|
|
118
119
|
FragmentReference,
|
|
119
120
|
FragmentSpecResolver,
|
|
@@ -136,9 +137,9 @@ export type {
|
|
|
136
137
|
PluralReaderSelector,
|
|
137
138
|
Props,
|
|
138
139
|
PublishQueue,
|
|
140
|
+
ReactFlightClientResponse,
|
|
139
141
|
ReactFlightPayloadDeserializer,
|
|
140
142
|
ReactFlightServerErrorHandler,
|
|
141
|
-
ReactFlightClientResponse,
|
|
142
143
|
ReaderSelector,
|
|
143
144
|
ReadOnlyRecordProxy,
|
|
144
145
|
RecordProxy,
|
|
@@ -146,6 +147,7 @@ export type {
|
|
|
146
147
|
RecordSourceSelectorProxy,
|
|
147
148
|
RelayContext,
|
|
148
149
|
RequestDescriptor,
|
|
150
|
+
RequiredFieldLogger,
|
|
149
151
|
SelectorData,
|
|
150
152
|
SelectorStoreUpdater,
|
|
151
153
|
SingularReaderSelector,
|
|
@@ -14,7 +14,7 @@ var ConnectionHandler = require('./connection/ConnectionHandler');
|
|
|
14
14
|
|
|
15
15
|
var MutationHandlers = require('./connection/MutationHandlers');
|
|
16
16
|
|
|
17
|
-
var invariant = require(
|
|
17
|
+
var invariant = require('invariant');
|
|
18
18
|
|
|
19
19
|
function RelayDefaultHandlerProvider(handle) {
|
|
20
20
|
switch (handle) {
|
|
@@ -14,7 +14,7 @@ var ConnectionInterface = require('./ConnectionInterface');
|
|
|
14
14
|
|
|
15
15
|
var getRelayHandleKey = require('../../util/getRelayHandleKey');
|
|
16
16
|
|
|
17
|
-
var invariant = require(
|
|
17
|
+
var invariant = require('invariant');
|
|
18
18
|
|
|
19
19
|
var warning = require("fbjs/lib/warning");
|
|
20
20
|
|
|
@@ -18,7 +18,7 @@ var ConnectionHandler = require('./ConnectionHandler');
|
|
|
18
18
|
|
|
19
19
|
var ConnectionInterface = require('./ConnectionInterface');
|
|
20
20
|
|
|
21
|
-
var invariant = require(
|
|
21
|
+
var invariant = require('invariant');
|
|
22
22
|
|
|
23
23
|
var warning = require("fbjs/lib/warning");
|
|
24
24
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @emails oncall+relay
|
|
8
|
+
*
|
|
9
|
+
* @format
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
/**
|
|
13
|
+
* A unique identifier of the current actor.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
module.exports = {
|
|
17
|
+
getActorIdentifier: function getActorIdentifier(actorID) {
|
|
18
|
+
return actorID;
|
|
19
|
+
},
|
|
20
|
+
getDefaultActorIdentifier: function getDefaultActorIdentifier() {
|
|
21
|
+
throw new Error('Not Implemented');
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @emails oncall+relay
|
|
8
|
+
*
|
|
9
|
+
* @format
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
var RelayOperationTracker = require('../store/RelayOperationTracker');
|
|
14
|
+
|
|
15
|
+
function todo() {
|
|
16
|
+
throw new Error('Not implementd');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var ActorSpecificEnvironment = /*#__PURE__*/function () {
|
|
20
|
+
// Actor specific properties
|
|
21
|
+
function ActorSpecificEnvironment(config) {
|
|
22
|
+
this.actorIdentifier = config.actorIdentifier;
|
|
23
|
+
this.multiActorEnvironment = config.multiActorEnvironment;
|
|
24
|
+
this.__log = config.logFn;
|
|
25
|
+
this.requiredFieldLogger = config.requiredFieldLogger;
|
|
26
|
+
this._operationTracker = new RelayOperationTracker();
|
|
27
|
+
this._store = config.store;
|
|
28
|
+
this._network = config.network;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var _proto = ActorSpecificEnvironment.prototype;
|
|
32
|
+
|
|
33
|
+
_proto.UNSTABLE_getDefaultRenderPolicy = function UNSTABLE_getDefaultRenderPolicy() {
|
|
34
|
+
return todo();
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
_proto.applyMutation = function applyMutation(optimisticConfig) {
|
|
38
|
+
return this.multiActorEnvironment.applyMutation(this.actorIdentifier, optimisticConfig);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
_proto.applyUpdate = function applyUpdate(optimisticUpdate) {
|
|
42
|
+
return this.multiActorEnvironment.applyUpdate(this.actorIdentifier, optimisticUpdate);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
_proto.check = function check(operation) {
|
|
46
|
+
return this.multiActorEnvironment.check(this.actorIdentifier, operation);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
_proto.subscribe = function subscribe(snapshot, callback) {
|
|
50
|
+
return this.multiActorEnvironment.subscribe(this.actorIdentifier, snapshot, callback);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
_proto.retain = function retain(operation) {
|
|
54
|
+
return this.multiActorEnvironment.retain(this.actorIdentifier, operation);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
_proto.commitUpdate = function commitUpdate(updater) {
|
|
58
|
+
return this.multiActorEnvironment.commitUpdate(this.actorIdentifier, updater);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Commit a payload to the environment using the given operation selector.
|
|
62
|
+
*/
|
|
63
|
+
;
|
|
64
|
+
|
|
65
|
+
_proto.commitPayload = function commitPayload(operationDescriptor, payload) {
|
|
66
|
+
return this.multiActorEnvironment.commitPayload(this.actorIdentifier, operationDescriptor, payload);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
_proto.getNetwork = function getNetwork() {
|
|
70
|
+
return this._network;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
_proto.getStore = function getStore() {
|
|
74
|
+
return this._store;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
_proto.getOperationTracker = function getOperationTracker() {
|
|
78
|
+
return this._operationTracker;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
_proto.lookup = function lookup(selector) {
|
|
82
|
+
return this.multiActorEnvironment.lookup(this.actorIdentifier, selector);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
_proto.execute = function execute(config) {
|
|
86
|
+
return this.multiActorEnvironment.execute(this.actorIdentifier, config);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
_proto.executeMutation = function executeMutation(options) {
|
|
90
|
+
return this.multiActorEnvironment.executeMutation(this.actorIdentifier, options);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
_proto.executeWithSource = function executeWithSource(options) {
|
|
94
|
+
return this.multiActorEnvironment.executeWithSource(this.actorIdentifier, options);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
_proto.isRequestActive = function isRequestActive(requestIdentifier) {
|
|
98
|
+
return this.multiActorEnvironment.isRequestActive(this.actorIdentifier, requestIdentifier);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
_proto.isServer = function isServer() {
|
|
102
|
+
return todo();
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
return ActorSpecificEnvironment;
|
|
106
|
+
}();
|
|
107
|
+
|
|
108
|
+
module.exports = ActorSpecificEnvironment;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @emails oncall+relay
|
|
8
|
+
*
|
|
9
|
+
* @format
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
var ActorSpecificEnvironment = require('./ActorSpecificEnvironment');
|
|
14
|
+
|
|
15
|
+
var OperationExecutor = require('../store/OperationExecutor');
|
|
16
|
+
|
|
17
|
+
var RelayDefaultHandlerProvider = require('../handlers/RelayDefaultHandlerProvider');
|
|
18
|
+
|
|
19
|
+
var RelayModernStore = require('../store/RelayModernStore');
|
|
20
|
+
|
|
21
|
+
var RelayObservable = require('../network/RelayObservable');
|
|
22
|
+
|
|
23
|
+
var RelayPublishQueue = require('../store/RelayPublishQueue');
|
|
24
|
+
|
|
25
|
+
var RelayRecordSource = require('../store/RelayRecordSource');
|
|
26
|
+
|
|
27
|
+
var defaultGetDataID = require('../store/defaultGetDataID');
|
|
28
|
+
|
|
29
|
+
function todo(what) {
|
|
30
|
+
throw new Error("Not implementd: ".concat(what));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
var MultiActorEnvironment = /*#__PURE__*/function () {
|
|
34
|
+
function MultiActorEnvironment(config) {
|
|
35
|
+
var _config$getDataID, _config$treatMissingF;
|
|
36
|
+
|
|
37
|
+
this._actorEnvironments = new Map();
|
|
38
|
+
this._createNetworkForActor = config.createNetworkForActor;
|
|
39
|
+
this._getDataID = (_config$getDataID = config.getDataID) !== null && _config$getDataID !== void 0 ? _config$getDataID : defaultGetDataID;
|
|
40
|
+
this._handlerProvider = config.handlerProvider ? config.handlerProvider : RelayDefaultHandlerProvider;
|
|
41
|
+
this._logFn = config.logFn;
|
|
42
|
+
this._operationExecutions = new Map();
|
|
43
|
+
this._requiredFieldLogger = config.requiredFieldLogger;
|
|
44
|
+
this._treatMissingFieldsAsNull = (_config$treatMissingF = config.treatMissingFieldsAsNull) !== null && _config$treatMissingF !== void 0 ? _config$treatMissingF : false;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* This method will create an actor specfic environment. It will create a new instance
|
|
48
|
+
* and store it in the internal maps. If will return a memozied version
|
|
49
|
+
* of the environment if we already created one for actor.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
var _proto = MultiActorEnvironment.prototype;
|
|
54
|
+
|
|
55
|
+
_proto.forActor = function forActor(actorIdentifier) {
|
|
56
|
+
var environment = this._actorEnvironments.get(actorIdentifier);
|
|
57
|
+
|
|
58
|
+
if (environment == null) {
|
|
59
|
+
var newEnvironment = new ActorSpecificEnvironment({
|
|
60
|
+
actorIdentifier: actorIdentifier,
|
|
61
|
+
multiActorEnvironment: this,
|
|
62
|
+
logFn: this._logFn,
|
|
63
|
+
requiredFieldLogger: this._requiredFieldLogger,
|
|
64
|
+
store: new RelayModernStore(RelayRecordSource.create()),
|
|
65
|
+
network: this._createNetworkForActor(actorIdentifier)
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
this._actorEnvironments.set(actorIdentifier, newEnvironment);
|
|
69
|
+
|
|
70
|
+
return newEnvironment;
|
|
71
|
+
} else {
|
|
72
|
+
return environment;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
_proto.check = function check(actorIdentifier, operation) {
|
|
77
|
+
return todo('check');
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
_proto.subscribe = function subscribe(actorIdentifier, snapshot, callback) {
|
|
81
|
+
return todo('subscribe');
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
_proto.retain = function retain(actorIdentifier, operation) {
|
|
85
|
+
return todo('retain');
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
_proto.applyUpdate = function applyUpdate(actorIdentifier, optimisticUpdate) {
|
|
89
|
+
return todo('applyUpdate');
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
_proto.applyMutation = function applyMutation(actorIdentifier, optimisticConfig) {
|
|
93
|
+
return todo('applyMutation');
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
_proto.commitUpdate = function commitUpdate(actorIdentifier, updater) {
|
|
97
|
+
return todo('commitUpdate');
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
_proto.commitPayload = function commitPayload(actorIdentifier, operationDescriptor, payload) {
|
|
101
|
+
return todo('commitPayload');
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
_proto.lookup = function lookup(actorIdentifier, selector) {
|
|
105
|
+
return todo('lookup');
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
_proto.execute = function execute(actorIdentifier, config) {
|
|
109
|
+
var _this = this;
|
|
110
|
+
|
|
111
|
+
var operation = config.operation,
|
|
112
|
+
updater = config.updater;
|
|
113
|
+
return RelayObservable.create(function (sink) {
|
|
114
|
+
var actorEnvironemnt = _this.forActor(actorIdentifier);
|
|
115
|
+
|
|
116
|
+
var source = actorEnvironemnt.getNetwork().execute(operation.request.node.params, operation.request.variables, operation.request.cacheConfig || {}, null);
|
|
117
|
+
var executor = OperationExecutor.execute({
|
|
118
|
+
operation: operation,
|
|
119
|
+
operationExecutions: _this._operationExecutions,
|
|
120
|
+
operationLoader: null,
|
|
121
|
+
optimisticConfig: null,
|
|
122
|
+
publishQueue: new RelayPublishQueue(actorEnvironemnt.getStore(), _this._handlerProvider, _this._getDataID),
|
|
123
|
+
reactFlightPayloadDeserializer: null,
|
|
124
|
+
reactFlightServerErrorHandler: null,
|
|
125
|
+
scheduler: null,
|
|
126
|
+
sink: sink,
|
|
127
|
+
source: source,
|
|
128
|
+
store: actorEnvironemnt.getStore(),
|
|
129
|
+
updater: updater,
|
|
130
|
+
operationTracker: actorEnvironemnt.getOperationTracker(),
|
|
131
|
+
getDataID: _this._getDataID,
|
|
132
|
+
treatMissingFieldsAsNull: _this._treatMissingFieldsAsNull,
|
|
133
|
+
shouldProcessClientComponents: false
|
|
134
|
+
});
|
|
135
|
+
return function () {
|
|
136
|
+
return executor.cancel();
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
_proto.executeMutation = function executeMutation(actorIdentifier, config) {
|
|
142
|
+
return todo('executeMutation');
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
_proto.executeWithSource = function executeWithSource(actorIdentifier, config) {
|
|
146
|
+
return todo('executeWithSource');
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
_proto.isRequestActive = function isRequestActive(actorIdentifier, requestIdentifier) {
|
|
150
|
+
return todo('isRequestActive');
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
return MultiActorEnvironment;
|
|
154
|
+
}();
|
|
155
|
+
|
|
156
|
+
module.exports = MultiActorEnvironment;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @emails oncall+relay
|
|
8
|
+
*
|
|
9
|
+
* @format
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
var MultiActorEnvironment = require('./MultiActorEnvironment');
|
|
14
|
+
|
|
15
|
+
module.exports = {
|
|
16
|
+
MultiActorEnvironment: MultiActorEnvironment
|
|
17
|
+
};
|
|
@@ -14,7 +14,7 @@ var RelayModernRecord = require('../store/RelayModernRecord');
|
|
|
14
14
|
|
|
15
15
|
var RelayRecordProxy = require('./RelayRecordProxy');
|
|
16
16
|
|
|
17
|
-
var invariant = require(
|
|
17
|
+
var invariant = require('invariant');
|
|
18
18
|
|
|
19
19
|
var _require = require('../store/RelayRecordState'),
|
|
20
20
|
EXISTENT = _require.EXISTENT,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
var RelayDeclarativeMutationConfig = require('./RelayDeclarativeMutationConfig');
|
|
14
14
|
|
|
15
|
-
var invariant = require(
|
|
15
|
+
var invariant = require('invariant');
|
|
16
16
|
|
|
17
17
|
var isRelayModernEnvironment = require('../store/isRelayModernEnvironment');
|
|
18
18
|
|
|
@@ -16,7 +16,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
16
16
|
|
|
17
17
|
var RelayDeclarativeMutationConfig = require('./RelayDeclarativeMutationConfig');
|
|
18
18
|
|
|
19
|
-
var invariant = require(
|
|
19
|
+
var invariant = require('invariant');
|
|
20
20
|
|
|
21
21
|
var isRelayModernEnvironment = require('../store/isRelayModernEnvironment');
|
|
22
22
|
|
|
@@ -14,7 +14,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
14
14
|
|
|
15
15
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
16
16
|
|
|
17
|
-
var invariant = require(
|
|
17
|
+
var invariant = require('invariant');
|
|
18
18
|
|
|
19
19
|
var stableCopy = require('../util/stableCopy');
|
|
20
20
|
|
package/lib/query/GraphQLTag.js
CHANGED
package/lib/query/fetchQuery.js
CHANGED
|
@@ -19,7 +19,7 @@ var RelayObservable = require('../network/RelayObservable');
|
|
|
19
19
|
|
|
20
20
|
var fetchQueryInternal = require('./fetchQueryInternal');
|
|
21
21
|
|
|
22
|
-
var invariant = require(
|
|
22
|
+
var invariant = require('invariant');
|
|
23
23
|
|
|
24
24
|
var reportMissingRequiredFields = require('../util/reportMissingRequiredFields');
|
|
25
25
|
|
|
@@ -14,7 +14,7 @@ var Observable = require('../network/RelayObservable');
|
|
|
14
14
|
|
|
15
15
|
var RelayReplaySubject = require('../util/RelayReplaySubject');
|
|
16
16
|
|
|
17
|
-
var invariant = require(
|
|
17
|
+
var invariant = require('invariant');
|
|
18
18
|
|
|
19
19
|
var WEAKMAP_SUPPORTED = typeof WeakMap === 'function';
|
|
20
20
|
var requestCachesByEnvironment = WEAKMAP_SUPPORTED ? new WeakMap() : new Map();
|
package/lib/store/DataChecker.js
CHANGED
|
@@ -35,7 +35,7 @@ var cloneRelayScalarHandleSourceField = require('./cloneRelayScalarHandleSourceF
|
|
|
35
35
|
|
|
36
36
|
var getOperation = require('../util/getOperation');
|
|
37
37
|
|
|
38
|
-
var invariant = require(
|
|
38
|
+
var invariant = require('invariant');
|
|
39
39
|
|
|
40
40
|
var _require = require('./ClientID'),
|
|
41
41
|
isClientID = _require.isClientID;
|