relay-runtime 0.0.0-main-80a38d88 → 0.0.0-main-772a83c5
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/handlers/connection/ConnectionHandler.js.flow +0 -7
- package/handlers/connection/MutationHandlers.js.flow +0 -3
- package/index.js +1 -1
- package/index.js.flow +7 -0
- package/lib/handlers/connection/ConnectionHandler.js +5 -11
- package/lib/handlers/connection/MutationHandlers.js +3 -6
- package/lib/multi-actor-environment/ActorSpecificEnvironment.js +4 -0
- package/lib/multi-actor-environment/MultiActorEnvironment.js +27 -14
- package/lib/mutations/commitMutation.js +1 -4
- package/lib/network/RelayObservable.js +1 -3
- package/lib/store/DataChecker.js +1 -2
- package/lib/store/RelayConcreteVariables.js +3 -7
- package/lib/store/RelayModernEnvironment.js +55 -31
- package/lib/store/RelayModernStore.js +1 -2
- package/lib/store/RelayReader.js +1 -2
- package/lib/store/RelayReferenceMarker.js +1 -2
- package/lib/store/RelayResponseNormalizer.js +1 -2
- package/lib/store/RelayStoreUtils.js +1 -2
- package/lib/subscription/requestSubscription.js +1 -1
- package/lib/util/RelayRuntimeTypes.js +0 -6
- package/lib/util/getPaginationVariables.js +2 -3
- package/multi-actor-environment/ActorSpecificEnvironment.js.flow +7 -1
- package/multi-actor-environment/MultiActorEnvironment.js.flow +25 -0
- package/multi-actor-environment/MultiActorEnvironmentTypes.js.flow +17 -2
- package/mutations/commitMutation.js.flow +0 -2
- package/network/RelayObservable.js.flow +0 -2
- package/package.json +1 -1
- package/relay-runtime.js +2 -2
- package/relay-runtime.min.js +2 -2
- package/store/ClientID.js.flow +1 -1
- package/store/DataChecker.js.flow +0 -1
- package/store/RelayConcreteVariables.js.flow +0 -5
- package/store/RelayModernEnvironment.js.flow +29 -1
- package/store/RelayModernStore.js.flow +0 -1
- package/store/RelayReader.js.flow +0 -1
- package/store/RelayReferenceMarker.js.flow +0 -1
- package/store/RelayResponseNormalizer.js.flow +0 -1
- package/store/RelayStoreTypes.js.flow +14 -2
- package/store/RelayStoreUtils.js.flow +0 -1
- package/store/TypeID.js.flow +1 -1
- package/subscription/requestSubscription.js.flow +1 -1
- package/util/RelayFeatureFlags.js.flow +1 -1
- package/util/RelayRuntimeTypes.js.flow +68 -1
- package/util/getPaginationVariables.js.flow +0 -2
|
@@ -180,13 +180,28 @@ export interface IMultiActorEnvironment {
|
|
|
180
180
|
* responses may be returned (via `next`) over time followed by either
|
|
181
181
|
* the request completing (`completed`) or an error (`error`).
|
|
182
182
|
*
|
|
183
|
+
* Note: Observables are lazy, so calling this method will do nothing until
|
|
184
|
+
* the result is subscribed to: environment.execute({...}).subscribe({...}).
|
|
185
|
+
*/
|
|
186
|
+
execute(
|
|
187
|
+
actorEnvironment: IActorEnvironment,
|
|
188
|
+
config: {
|
|
189
|
+
operation: OperationDescriptor,
|
|
190
|
+
},
|
|
191
|
+
): RelayObservable<GraphQLResponse>;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Send a subscription to the server with Observer semantics: one or more
|
|
195
|
+
* responses may be returned (via `next`) over time followed by either
|
|
196
|
+
* the request completing (`completed`) or an error (`error`).
|
|
197
|
+
*
|
|
183
198
|
* Networks/servers that support subscriptions may choose to hold the
|
|
184
199
|
* subscription open indefinitely such that `complete` is not called.
|
|
185
200
|
*
|
|
186
201
|
* Note: Observables are lazy, so calling this method will do nothing until
|
|
187
|
-
* the result is subscribed to: environment.
|
|
202
|
+
* the result is subscribed to: environment.executeSubscription({...}).subscribe({...}).
|
|
188
203
|
*/
|
|
189
|
-
|
|
204
|
+
executeSubscription(
|
|
190
205
|
actorEnvironment: IActorEnvironment,
|
|
191
206
|
config: {
|
|
192
207
|
operation: OperationDescriptor,
|
|
@@ -106,8 +106,6 @@ function commitMutation<T: MutationParameters>(
|
|
|
106
106
|
} = config;
|
|
107
107
|
const operation = createOperationDescriptor(
|
|
108
108
|
mutation,
|
|
109
|
-
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
|
110
|
-
* parameters */
|
|
111
109
|
variables,
|
|
112
110
|
cacheConfig,
|
|
113
111
|
generateUniqueClientID(),
|
|
@@ -355,13 +355,11 @@ class RelayObservable<+T> implements Subscribable<T> {
|
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
// $FlowFixMe[incompatible-call]
|
|
359
358
|
this.subscribe({
|
|
360
359
|
start,
|
|
361
360
|
next(value) {
|
|
362
361
|
try {
|
|
363
362
|
if (!sink.closed) {
|
|
364
|
-
// $FlowFixMe[incompatible-call]
|
|
365
363
|
RelayObservable.from(fn(value)).subscribe({
|
|
366
364
|
start,
|
|
367
365
|
next: sink.next,
|