relay-runtime 21.0.0 → 21.0.1
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.d.ts +34 -0
- package/experimental.js +1 -1
- package/experimental.js.flow +4 -4
- package/handlers/RelayDefaultHandlerProvider.d.ts +12 -0
- package/handlers/connection/ConnectionHandler.d.ts +51 -0
- package/handlers/connection/ConnectionInterface.d.ts +40 -0
- package/handlers/connection/MutationHandlers.d.ts +17 -0
- package/index.d.ts +274 -0
- package/index.js +1 -1
- package/llm-docs/api-reference/relay-runtime/fetch-query.mdx +5 -0
- package/llm-docs/getting-started/compiler.mdx +19 -3
- package/llm-docs/getting-started/quick-start.mdx +15 -12
- package/llm-docs/guides/codemods.mdx +14 -1
- package/multi-actor-environment/ActorIdentifier.d.ts +17 -0
- package/multi-actor-environment/ActorSpecificEnvironment.js.flow +9 -9
- package/multi-actor-environment/MultiActorEnvironment.d.ts +123 -0
- package/multi-actor-environment/MultiActorEnvironment.js.flow +22 -18
- package/multi-actor-environment/MultiActorEnvironmentTypes.d.ts +225 -0
- package/multi-actor-environment/MultiActorEnvironmentTypes.js.flow +3 -3
- package/multi-actor-environment/index.d.ts +14 -0
- package/multi-actor-environment.d.ts +8 -0
- package/mutations/RelayDeclarativeMutationConfig.d.ts +70 -0
- package/mutations/applyOptimisticMutation.d.ts +25 -0
- package/mutations/commitLocalUpdate.d.ts +10 -0
- package/mutations/commitMutation.d.ts +48 -0
- package/mutations/commitMutation.js.flow +1 -1
- package/network/RelayNetwork.d.ts +12 -0
- package/network/RelayNetworkTypes.d.ts +145 -0
- package/network/RelayNetworkTypes.js.flow +15 -15
- package/network/RelayObservable.d.ts +197 -0
- package/network/RelayObservable.js.flow +21 -21
- package/network/RelayQueryResponseCache.d.ts +16 -0
- package/package.json +1 -1
- package/query/GraphQLTag.d.ts +45 -0
- package/query/fetchQuery.d.ts +21 -0
- package/query/fetchQueryInternal.d.ts +26 -0
- package/query/fetchQueryInternal.js.flow +4 -4
- package/query/fetchQuery_DEPRECATED.d.ts +17 -0
- package/store/ClientID.d.ts +14 -0
- package/store/DataChecker.js.flow +8 -6
- package/store/NormalizationEngine.js.flow +4 -1
- package/store/OperationExecutor.d.ts +51 -0
- package/store/OperationExecutor.js.flow +33 -30
- package/store/RelayModernEnvironment.d.ts +97 -0
- package/store/RelayModernEnvironment.js.flow +21 -21
- package/store/RelayModernOperationDescriptor.d.ts +28 -0
- package/store/RelayModernRecord.d.ts +92 -0
- package/store/RelayModernSelector.d.ts +123 -0
- package/store/RelayModernStore.d.ts +57 -0
- package/store/RelayOperationTracker.d.ts +29 -0
- package/store/RelayPublishQueue.js.flow +8 -8
- package/store/RelayRecordSource.d.ts +26 -0
- package/store/RelayRecordState.d.ts +28 -0
- package/store/RelayResponseNormalizer.d.ts +28 -0
- package/store/RelayResponseNormalizer.js.flow +8 -8
- package/store/RelayStoreTypes.d.ts +1327 -0
- package/store/RelayStoreTypes.js.flow +284 -280
- package/store/RelayStoreUtils.d.ts +86 -0
- package/store/RelayStoreUtils.js.flow +2 -2
- package/store/ResolverFragments.d.ts +43 -0
- package/store/ResolverFragments.js.flow +14 -6
- package/store/StoreInspector.js.flow +2 -2
- package/store/ViewerPattern.d.ts +11 -0
- package/store/createFragmentSpecResolver.d.ts +16 -0
- package/store/defaultGetDataID.js.flow +1 -1
- package/store/isRelayModernEnvironment.d.ts +8 -0
- package/store/live-resolvers/LiveResolverCache.js.flow +1 -1
- package/store/live-resolvers/resolverDataInjector.d.ts +27 -0
- package/store/observeFragmentExperimental.d.ts +46 -0
- package/store/observeFragmentExperimental.js.flow +1 -1
- package/store/observeQueryExperimental.d.ts +30 -0
- package/store/readInlineData.d.ts +19 -0
- package/store/readInlineData.js.flow +1 -1
- package/store/waitForFragmentExperimental.d.ts +49 -0
- package/subscription/requestSubscription.d.ts +27 -0
- package/subscription/requestSubscription.js.flow +3 -3
- package/util/JSResourceTypes.flow.js.flow +4 -4
- package/util/NormalizationNode.d.ts +235 -0
- package/util/NormalizationNode.js.flow +124 -122
- package/util/ReaderNode.d.ts +264 -0
- package/util/ReaderNode.js.flow +152 -149
- package/util/RelayConcreteNode.d.ts +120 -0
- package/util/RelayConcreteNode.js.flow +31 -31
- package/util/RelayError.d.ts +13 -0
- package/util/RelayFeatureFlags.d.ts +40 -0
- package/util/RelayProfiler.d.ts +121 -0
- package/util/RelayReplaySubject.d.ts +25 -0
- package/util/RelayRuntimeTypes.d.ts +59 -0
- package/util/RelayRuntimeTypes.js.flow +33 -30
- package/util/createPayloadFor3DField.d.ts +17 -0
- package/util/createPayloadFor3DField.js.flow +4 -4
- package/util/deepFreeze.d.ts +8 -0
- package/util/getFragmentIdentifier.d.ts +10 -0
- package/util/getPaginationMetadata.d.ts +20 -0
- package/util/getPaginationVariables.d.ts +20 -0
- package/util/getPendingOperationsForFragment.d.ts +18 -0
- package/util/getRefetchMetadata.d.ts +19 -0
- package/util/getRelayHandleKey.d.ts +8 -0
- package/util/getRequestIdentifier.d.ts +17 -0
- package/util/getValueAtPath.d.ts +8 -0
- package/util/handlePotentialSnapshotErrors.d.ts +14 -0
- package/util/isEmptyObject.js.flow +1 -1
- package/util/isPromise.d.ts +8 -0
- package/util/isScalarAndEqual.d.ts +8 -0
- package/util/recycleNodesInto.d.ts +8 -0
- package/util/stableCopy.d.ts +8 -0
- package/util/withProvidedVariables.d.ts +19 -0
|
@@ -66,9 +66,9 @@ export type OperationTracker = RelayOperationTracker;
|
|
|
66
66
|
export type Record = RelayModernRecord;
|
|
67
67
|
|
|
68
68
|
export type MutationParameters = {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
readonly response: {...},
|
|
70
|
+
readonly variables: {...},
|
|
71
|
+
readonly rawResponse?: {...},
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
export type FragmentMap = {[key: string]: ReaderFragment, ...};
|
|
@@ -79,20 +79,20 @@ export type FragmentMap = {[key: string]: ReaderFragment, ...};
|
|
|
79
79
|
export type SelectorData = {[key: string]: unknown, ...};
|
|
80
80
|
|
|
81
81
|
export type SingularReaderSelector = {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
readonly kind: 'SingularReaderSelector',
|
|
83
|
+
readonly dataID: DataID,
|
|
84
|
+
readonly isWithinUnmatchedTypeRefinement: boolean,
|
|
85
|
+
readonly clientEdgeTraversalPath: ClientEdgeTraversalPath | null,
|
|
86
|
+
readonly node: ReaderFragment,
|
|
87
|
+
readonly owner: RequestDescriptor,
|
|
88
|
+
readonly variables: Variables,
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
export type ReaderSelector = SingularReaderSelector | PluralReaderSelector;
|
|
92
92
|
|
|
93
93
|
export type PluralReaderSelector = {
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
readonly kind: 'PluralReaderSelector',
|
|
95
|
+
readonly selectors: ReadonlyArray<SingularReaderSelector>,
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
export type FieldErrorType =
|
|
@@ -101,10 +101,10 @@ export type FieldErrorType =
|
|
|
101
101
|
| 'PAYLOAD_ERROR';
|
|
102
102
|
|
|
103
103
|
export type RequestDescriptor = {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
readonly identifier: RequestIdentifier,
|
|
105
|
+
readonly node: ConcreteRequest,
|
|
106
|
+
readonly variables: Variables,
|
|
107
|
+
readonly cacheConfig: ?CacheConfig,
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
/**
|
|
@@ -112,9 +112,9 @@ export type RequestDescriptor = {
|
|
|
112
112
|
* purposes of targeting a subgraph.
|
|
113
113
|
*/
|
|
114
114
|
export type NormalizationSelector = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
readonly dataID: DataID,
|
|
116
|
+
readonly node: NormalizationSelectableNode,
|
|
117
|
+
readonly variables: Variables,
|
|
118
118
|
};
|
|
119
119
|
|
|
120
120
|
export type FieldError =
|
|
@@ -128,29 +128,29 @@ export type FieldError =
|
|
|
128
128
|
export type FieldErrors = Array<FieldError>;
|
|
129
129
|
|
|
130
130
|
export type ClientEdgeTraversalInfo = {
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
readonly readerClientEdge: ReaderClientEdgeToServerObject,
|
|
132
|
+
readonly clientEdgeDestinationID: DataID,
|
|
133
133
|
};
|
|
134
134
|
|
|
135
135
|
export type ClientEdgeTraversalPath =
|
|
136
136
|
ReadonlyArray<ClientEdgeTraversalInfo | null>;
|
|
137
137
|
|
|
138
138
|
export type MissingClientEdgeRequestInfo = {
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
readonly request: ConcreteRequest,
|
|
140
|
+
readonly clientEdgeDestinationID: DataID,
|
|
141
141
|
};
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
144
|
* A representation of a selector and its results at a particular point in time.
|
|
145
145
|
*/
|
|
146
146
|
export type Snapshot = {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
147
|
+
readonly data: ?SelectorData,
|
|
148
|
+
readonly isMissingData: boolean,
|
|
149
|
+
readonly missingLiveResolverFields?: ReadonlyArray<DataID>,
|
|
150
|
+
readonly missingClientEdges: null | ReadonlyArray<MissingClientEdgeRequestInfo>,
|
|
151
|
+
readonly seenRecords: DataIDSet,
|
|
152
|
+
readonly selector: SingularReaderSelector,
|
|
153
|
+
readonly fieldErrors: ?FieldErrors,
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
/**
|
|
@@ -163,9 +163,9 @@ export type Snapshot = {
|
|
|
163
163
|
* the results of the the operation.
|
|
164
164
|
*/
|
|
165
165
|
export type OperationDescriptor = {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
readonly fragment: SingularReaderSelector,
|
|
167
|
+
readonly request: RequestDescriptor,
|
|
168
|
+
readonly root: NormalizationSelector,
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
/**
|
|
@@ -246,7 +246,7 @@ export interface RecordSource {
|
|
|
246
246
|
/**
|
|
247
247
|
* A collection of records keyed by id.
|
|
248
248
|
*/
|
|
249
|
-
export type RecordSourceJSON = {
|
|
249
|
+
export type RecordSourceJSON = {readonly [DataID]: ?RecordJSON};
|
|
250
250
|
|
|
251
251
|
/**
|
|
252
252
|
* A read/write interface for accessing and updating graph data.
|
|
@@ -259,10 +259,14 @@ export interface MutableRecordSource extends RecordSource {
|
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
export type CheckOptions = {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
262
|
+
readonly handlers: ReadonlyArray<MissingFieldHandler>,
|
|
263
|
+
readonly defaultActorIdentifier: ActorIdentifier,
|
|
264
|
+
readonly getTargetForActor: (
|
|
265
|
+
actorIdentifier: ActorIdentifier,
|
|
266
|
+
) => MutableRecordSource,
|
|
267
|
+
readonly getSourceForActor: (
|
|
268
|
+
actorIdentifier: ActorIdentifier,
|
|
269
|
+
) => RecordSource,
|
|
266
270
|
};
|
|
267
271
|
|
|
268
272
|
export type OperationAvailability =
|
|
@@ -449,8 +453,8 @@ export type Scheduler = (() => void) => void;
|
|
|
449
453
|
* A type that can schedule callbacks and also cancel them.
|
|
450
454
|
*/
|
|
451
455
|
export type TaskScheduler = {
|
|
452
|
-
|
|
453
|
-
|
|
456
|
+
readonly cancel: (id: string) => void,
|
|
457
|
+
readonly schedule: (fn: () => void, priority?: TaskPriority) => string,
|
|
454
458
|
};
|
|
455
459
|
|
|
456
460
|
export type TaskPriority = 'default' | 'low';
|
|
@@ -507,7 +511,7 @@ export interface ReadOnlyRecordProxy {
|
|
|
507
511
|
* This type is expected by store.readUpdatableFragment.
|
|
508
512
|
*/
|
|
509
513
|
export type HasUpdatableSpread<TFragmentType> = {
|
|
510
|
-
|
|
514
|
+
readonly $updatableFragmentSpreads: TFragmentType,
|
|
511
515
|
...
|
|
512
516
|
};
|
|
513
517
|
|
|
@@ -516,7 +520,7 @@ export type HasUpdatableSpread<TFragmentType> = {
|
|
|
516
520
|
* readUpdatableFragment.
|
|
517
521
|
*/
|
|
518
522
|
export type UpdatableData<TData> = {
|
|
519
|
-
|
|
523
|
+
readonly updatableData: TData,
|
|
520
524
|
};
|
|
521
525
|
|
|
522
526
|
/**
|
|
@@ -557,270 +561,270 @@ export interface RecordSourceSelectorProxy extends RecordSourceProxy {
|
|
|
557
561
|
}
|
|
558
562
|
|
|
559
563
|
export type SuspenseFragmentLogEvent = {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
564
|
+
readonly name: 'suspense.fragment',
|
|
565
|
+
readonly data: unknown,
|
|
566
|
+
readonly fragment: ReaderFragment,
|
|
567
|
+
readonly isRelayHooks: boolean,
|
|
568
|
+
readonly isMissingData: boolean,
|
|
569
|
+
readonly isPromiseCached: boolean,
|
|
570
|
+
readonly pendingOperations: ReadonlyArray<RequestDescriptor>,
|
|
567
571
|
};
|
|
568
572
|
|
|
569
573
|
export type SuspenseResolverLogEvent = {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
574
|
+
readonly name: 'suspense.resolver',
|
|
575
|
+
readonly fragment: ReaderFragment,
|
|
576
|
+
readonly fragmentOwner: RequestDescriptor,
|
|
577
|
+
readonly isMount: boolean,
|
|
578
|
+
readonly suspendingLiveResolvers: ReadonlyArray<DataID>,
|
|
575
579
|
};
|
|
576
580
|
|
|
577
581
|
export type SuspenseClientEdgeLogEvent = {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
+
readonly name: 'suspense.client_edge',
|
|
583
|
+
readonly fragment: ReaderFragment,
|
|
584
|
+
readonly fragmentOwner: RequestDescriptor,
|
|
585
|
+
readonly isMount: boolean,
|
|
582
586
|
};
|
|
583
587
|
|
|
584
588
|
export type SuspenseMissingDataLogEvent = {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
589
|
+
readonly name: 'suspense.missing_data',
|
|
590
|
+
readonly fragment: ReaderFragment,
|
|
591
|
+
readonly fragmentOwner: RequestDescriptor,
|
|
592
|
+
readonly isMount: boolean,
|
|
593
|
+
readonly pendingOperations: ReadonlyArray<RequestDescriptor>,
|
|
590
594
|
};
|
|
591
595
|
|
|
592
596
|
export type SuspenseQueryLogEvent = {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
597
|
+
readonly name: 'suspense.query',
|
|
598
|
+
readonly fetchPolicy: string,
|
|
599
|
+
readonly isPromiseCached: boolean,
|
|
600
|
+
readonly operation: OperationDescriptor,
|
|
601
|
+
readonly queryAvailability: ?OperationAvailability,
|
|
602
|
+
readonly renderPolicy: RenderPolicy,
|
|
599
603
|
};
|
|
600
604
|
|
|
601
605
|
export type QueryResourceFetchLogEvent = {
|
|
602
|
-
|
|
606
|
+
readonly name: 'queryresource.fetch',
|
|
603
607
|
// ID of this query resource request and will be the same
|
|
604
608
|
// if there is an associated queryresource.retain event.
|
|
605
|
-
|
|
606
|
-
|
|
609
|
+
readonly resourceID: number,
|
|
610
|
+
readonly operation: OperationDescriptor,
|
|
607
611
|
// value from ProfilerContext
|
|
608
|
-
|
|
612
|
+
readonly profilerContext: unknown,
|
|
609
613
|
// FetchPolicy from Relay Hooks
|
|
610
|
-
|
|
614
|
+
readonly fetchPolicy: string,
|
|
611
615
|
// RenderPolicy from Relay Hooks
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
616
|
+
readonly renderPolicy: RenderPolicy,
|
|
617
|
+
readonly queryAvailability: OperationAvailability,
|
|
618
|
+
readonly shouldFetch: boolean,
|
|
615
619
|
};
|
|
616
620
|
|
|
617
621
|
export type QueryResourceRetainLogEvent = {
|
|
618
|
-
|
|
619
|
-
|
|
622
|
+
readonly name: 'queryresource.retain',
|
|
623
|
+
readonly resourceID: number,
|
|
620
624
|
// value from ProfilerContext
|
|
621
|
-
|
|
625
|
+
readonly profilerContext: unknown,
|
|
622
626
|
};
|
|
623
627
|
|
|
624
628
|
export type FragmentResourceMissingDataLogEvent = {
|
|
625
629
|
// Indicates FragmentResource is going to return a result that is missing
|
|
626
630
|
// data.
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
+
readonly name: 'fragmentresource.missing_data',
|
|
632
|
+
readonly data: unknown,
|
|
633
|
+
readonly fragment: ReaderFragment,
|
|
634
|
+
readonly isRelayHooks: boolean,
|
|
631
635
|
// Are we reading this result from the fragment resource cache?
|
|
632
|
-
|
|
636
|
+
readonly cached: boolean,
|
|
633
637
|
};
|
|
634
638
|
|
|
635
639
|
export type PendingOperationFoundLogEvent = {
|
|
636
640
|
// Indicates getPendingOperationForFragment identified a pending operation.
|
|
637
641
|
// Useful for measuring how frequently RelayOperationTracker identifies a
|
|
638
642
|
// related operation on which to suspend.
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
+
readonly name: 'pendingoperation.found',
|
|
644
|
+
readonly fragment: ReaderFragment,
|
|
645
|
+
readonly fragmentOwner: RequestDescriptor,
|
|
646
|
+
readonly pendingOperations: ReadonlyArray<RequestDescriptor>,
|
|
643
647
|
};
|
|
644
648
|
|
|
645
649
|
export type NetworkInfoLogEvent = {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
650
|
+
readonly name: 'network.info',
|
|
651
|
+
readonly networkRequestId: number,
|
|
652
|
+
readonly info: unknown,
|
|
649
653
|
};
|
|
650
654
|
|
|
651
655
|
export type NetworkStartLogEvent = {
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
656
|
+
readonly name: 'network.start',
|
|
657
|
+
readonly networkRequestId: number,
|
|
658
|
+
readonly params: RequestParameters,
|
|
659
|
+
readonly variables: Variables,
|
|
660
|
+
readonly cacheConfig: CacheConfig,
|
|
657
661
|
};
|
|
658
662
|
|
|
659
663
|
export type NetworkNextLogEvent = {
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
664
|
+
readonly name: 'network.next',
|
|
665
|
+
readonly networkRequestId: number,
|
|
666
|
+
readonly response: GraphQLResponse,
|
|
663
667
|
};
|
|
664
668
|
|
|
665
669
|
export type NetworkErrorLogEvent = {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
670
|
+
readonly name: 'network.error',
|
|
671
|
+
readonly networkRequestId: number,
|
|
672
|
+
readonly error: Error,
|
|
669
673
|
};
|
|
670
674
|
|
|
671
675
|
export type NetworkCompleteLogEvent = {
|
|
672
|
-
|
|
673
|
-
|
|
676
|
+
readonly name: 'network.complete',
|
|
677
|
+
readonly networkRequestId: number,
|
|
674
678
|
};
|
|
675
679
|
|
|
676
680
|
export type NetworkUnsubscribeLogEvent = {
|
|
677
|
-
|
|
678
|
-
|
|
681
|
+
readonly name: 'network.unsubscribe',
|
|
682
|
+
readonly networkRequestId: number,
|
|
679
683
|
};
|
|
680
684
|
|
|
681
685
|
export type ExecuteStartLogEvent = {
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
686
|
+
readonly name: 'execute.start',
|
|
687
|
+
readonly executeId: number,
|
|
688
|
+
readonly params: RequestParameters,
|
|
689
|
+
readonly variables: Variables,
|
|
690
|
+
readonly cacheConfig: CacheConfig,
|
|
687
691
|
};
|
|
688
692
|
|
|
689
693
|
export type ExecuteNextStartLogEvent = {
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
+
readonly name: 'execute.next.start',
|
|
695
|
+
readonly executeId: number,
|
|
696
|
+
readonly response: GraphQLResponse,
|
|
697
|
+
readonly operation: OperationDescriptor,
|
|
694
698
|
};
|
|
695
699
|
|
|
696
700
|
export type ExecuteNextEndLogEvent = {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
+
readonly name: 'execute.next.end',
|
|
702
|
+
readonly executeId: number,
|
|
703
|
+
readonly response: GraphQLResponse,
|
|
704
|
+
readonly operation: OperationDescriptor,
|
|
701
705
|
};
|
|
702
706
|
|
|
703
707
|
export type ExecuteAsyncModuleLogEvent = {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
+
readonly name: 'execute.async.module',
|
|
709
|
+
readonly executeId: number,
|
|
710
|
+
readonly operationName: string,
|
|
711
|
+
readonly duration: number,
|
|
708
712
|
};
|
|
709
713
|
|
|
710
714
|
export type ExecuteErrorLogEvent = {
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
715
|
+
readonly name: 'execute.error',
|
|
716
|
+
readonly executeId: number,
|
|
717
|
+
readonly error: Error,
|
|
714
718
|
};
|
|
715
719
|
|
|
716
720
|
export type ExecuteCompleteLogEvent = {
|
|
717
|
-
|
|
718
|
-
|
|
721
|
+
readonly name: 'execute.complete',
|
|
722
|
+
readonly executeId: number,
|
|
719
723
|
};
|
|
720
724
|
|
|
721
725
|
export type ExecuteUnsubscribeLogEvent = {
|
|
722
|
-
|
|
723
|
-
|
|
726
|
+
readonly name: 'execute.unsubscribe',
|
|
727
|
+
readonly executeId: number,
|
|
724
728
|
};
|
|
725
729
|
|
|
726
730
|
export type ExecuteNormalizeStart = {
|
|
727
|
-
|
|
728
|
-
|
|
731
|
+
readonly name: 'execute.normalize.start',
|
|
732
|
+
readonly operation: OperationDescriptor,
|
|
729
733
|
};
|
|
730
734
|
|
|
731
735
|
export type ExecuteNormalizeEnd = {
|
|
732
|
-
|
|
733
|
-
|
|
736
|
+
readonly name: 'execute.normalize.end',
|
|
737
|
+
readonly operation: OperationDescriptor,
|
|
734
738
|
};
|
|
735
739
|
|
|
736
740
|
export type StoreDataCheckerStartEvent = {
|
|
737
|
-
|
|
738
|
-
|
|
741
|
+
readonly name: 'store.datachecker.start',
|
|
742
|
+
readonly selector: NormalizationSelector,
|
|
739
743
|
};
|
|
740
744
|
|
|
741
745
|
export type StoreDataCheckerEndEvent = {
|
|
742
|
-
|
|
743
|
-
|
|
746
|
+
readonly name: 'store.datachecker.end',
|
|
747
|
+
readonly selector: NormalizationSelector,
|
|
744
748
|
};
|
|
745
749
|
|
|
746
750
|
export type StoreDataCheckerMissingEvent = {
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
751
|
+
readonly name: 'store.datachecker.missing',
|
|
752
|
+
readonly kind: 'scalar' | 'linked' | 'pluralLinked' | 'unknown_record',
|
|
753
|
+
readonly dataID: DataID,
|
|
754
|
+
readonly fieldName?: string,
|
|
755
|
+
readonly storageKey?: string,
|
|
752
756
|
};
|
|
753
757
|
|
|
754
758
|
export type StorePublishLogEvent = {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
759
|
+
readonly name: 'store.publish',
|
|
760
|
+
readonly source: RecordSource,
|
|
761
|
+
readonly optimistic: boolean,
|
|
758
762
|
};
|
|
759
763
|
|
|
760
764
|
export type StoreSnapshotLogEvent = {
|
|
761
|
-
|
|
765
|
+
readonly name: 'store.snapshot',
|
|
762
766
|
};
|
|
763
767
|
|
|
764
768
|
export type StoreLookupStartEvent = {
|
|
765
|
-
|
|
766
|
-
|
|
769
|
+
readonly name: 'store.lookup.start',
|
|
770
|
+
readonly selector: SingularReaderSelector,
|
|
767
771
|
};
|
|
768
772
|
|
|
769
773
|
export type StoreLookupEndEvent = {
|
|
770
|
-
|
|
771
|
-
|
|
774
|
+
readonly name: 'store.lookup.end',
|
|
775
|
+
readonly selector: SingularReaderSelector,
|
|
772
776
|
};
|
|
773
777
|
|
|
774
778
|
export type StoreRestoreLogEvent = {
|
|
775
|
-
|
|
779
|
+
readonly name: 'store.restore',
|
|
776
780
|
};
|
|
777
781
|
|
|
778
782
|
export type StoreGcStartEvent = {
|
|
779
|
-
|
|
783
|
+
readonly name: 'store.gc.start',
|
|
780
784
|
};
|
|
781
785
|
|
|
782
786
|
export type StoreGcInterruptedEvent = {
|
|
783
|
-
|
|
787
|
+
readonly name: 'store.gc.interrupted',
|
|
784
788
|
};
|
|
785
789
|
|
|
786
790
|
export type StoreGcEndEvent = {
|
|
787
|
-
|
|
788
|
-
|
|
791
|
+
readonly name: 'store.gc.end',
|
|
792
|
+
readonly references: DataIDSet,
|
|
789
793
|
};
|
|
790
794
|
|
|
791
795
|
export type StoreBatchStartLogEvent = {
|
|
792
|
-
|
|
796
|
+
readonly name: 'store.batch.start',
|
|
793
797
|
};
|
|
794
798
|
|
|
795
799
|
export type StoreBatchCompleteLogEvent = {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
800
|
+
readonly name: 'store.batch.complete',
|
|
801
|
+
readonly sourceOperations: Array<OperationDescriptor>,
|
|
802
|
+
readonly invalidateStore: boolean,
|
|
799
803
|
};
|
|
800
804
|
|
|
801
805
|
export type StoreNotifyStartLogEvent = {
|
|
802
|
-
|
|
803
|
-
|
|
806
|
+
readonly name: 'store.notify.start',
|
|
807
|
+
readonly sourceOperation: ?OperationDescriptor,
|
|
804
808
|
};
|
|
805
809
|
|
|
806
810
|
export type StoreNotifyCompleteLogEvent = {
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
811
|
+
readonly name: 'store.notify.complete',
|
|
812
|
+
readonly sourceOperation: ?OperationDescriptor,
|
|
813
|
+
readonly updatedRecordIDs: DataIDSet,
|
|
814
|
+
readonly invalidatedRecordIDs: DataIDSet,
|
|
815
|
+
readonly subscriptionsSize: number,
|
|
816
|
+
readonly updatedOwners: Array<RequestDescriptor>,
|
|
813
817
|
};
|
|
814
818
|
|
|
815
819
|
export type StoreNotifySubscriptionLogEvent = {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
+
readonly name: 'store.notify.subscription',
|
|
821
|
+
readonly sourceOperation: ?OperationDescriptor,
|
|
822
|
+
readonly snapshot: Snapshot,
|
|
823
|
+
readonly nextSnapshot: Snapshot,
|
|
820
824
|
};
|
|
821
825
|
|
|
822
826
|
export type ReaderReadFragmentSpread = {
|
|
823
|
-
|
|
827
|
+
readonly name: 'reader.fragmentSpread',
|
|
824
828
|
fragmentName: string,
|
|
825
829
|
data: SelectorData,
|
|
826
830
|
};
|
|
@@ -831,22 +835,22 @@ export type ReaderRead = {
|
|
|
831
835
|
};
|
|
832
836
|
|
|
833
837
|
export type EntrypointRootConsumeLogEvent = {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
838
|
+
readonly name: 'entrypoint.root.consume',
|
|
839
|
+
readonly profilerContext: unknown,
|
|
840
|
+
readonly rootModuleID: string,
|
|
837
841
|
};
|
|
838
842
|
|
|
839
843
|
export type LiveResolverBatchStartLogEvent = {
|
|
840
|
-
|
|
844
|
+
readonly name: 'liveresolver.batch.start',
|
|
841
845
|
};
|
|
842
846
|
|
|
843
847
|
export type LiveResolverBatchEndLogEvent = {
|
|
844
|
-
|
|
848
|
+
readonly name: 'liveresolver.batch.end',
|
|
845
849
|
};
|
|
846
850
|
|
|
847
851
|
export type UseFragmentSubscriptionMissedUpdates = {
|
|
848
|
-
|
|
849
|
-
|
|
852
|
+
readonly name: 'useFragment.subscription.missedUpdates',
|
|
853
|
+
readonly hasDataChanges: boolean,
|
|
850
854
|
};
|
|
851
855
|
|
|
852
856
|
/**
|
|
@@ -854,18 +858,18 @@ export type UseFragmentSubscriptionMissedUpdates = {
|
|
|
854
858
|
* but have different types, resulting in an collision in the store.
|
|
855
859
|
*/
|
|
856
860
|
export type IdCollisionTypenameLogEvent = {
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
861
|
+
readonly name: 'idCollision.typename',
|
|
862
|
+
readonly previous_typename: string,
|
|
863
|
+
readonly new_typename: string,
|
|
860
864
|
};
|
|
861
865
|
|
|
862
866
|
export type FetchQueryFetchLogEvent = {
|
|
863
|
-
|
|
864
|
-
|
|
867
|
+
readonly name: 'fetchquery.fetch',
|
|
868
|
+
readonly operation: OperationDescriptor,
|
|
865
869
|
// FetchPolicy from Relay Hooks
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
870
|
+
readonly fetchPolicy: string,
|
|
871
|
+
readonly queryAvailability: OperationAvailability,
|
|
872
|
+
readonly shouldFetch: boolean,
|
|
869
873
|
};
|
|
870
874
|
|
|
871
875
|
export type LogEvent =
|
|
@@ -929,7 +933,7 @@ export interface IEnvironment {
|
|
|
929
933
|
/**
|
|
930
934
|
* Extra information attached to the environment instance
|
|
931
935
|
*/
|
|
932
|
-
|
|
936
|
+
readonly options: unknown;
|
|
933
937
|
|
|
934
938
|
/**
|
|
935
939
|
* **UNSTABLE** Event based logging API thats scoped to the environment.
|
|
@@ -1121,9 +1125,9 @@ export interface IEnvironment {
|
|
|
1121
1125
|
* selection
|
|
1122
1126
|
*/
|
|
1123
1127
|
export type ModuleImportPointer = {
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1128
|
+
readonly __fragmentPropName: ?string,
|
|
1129
|
+
readonly __module_component: unknown,
|
|
1130
|
+
readonly $fragmentSpreads: unknown,
|
|
1127
1131
|
...
|
|
1128
1132
|
};
|
|
1129
1133
|
|
|
@@ -1148,18 +1152,18 @@ export type Handler = Readonly<{
|
|
|
1148
1152
|
*/
|
|
1149
1153
|
export type HandleFieldPayload = {
|
|
1150
1154
|
// The arguments that were fetched.
|
|
1151
|
-
|
|
1155
|
+
readonly args: Variables,
|
|
1152
1156
|
// The __id of the record containing the source/handle field.
|
|
1153
|
-
|
|
1157
|
+
readonly dataID: DataID,
|
|
1154
1158
|
// The (storage) key at which the original server data was written.
|
|
1155
|
-
|
|
1159
|
+
readonly fieldKey: string,
|
|
1156
1160
|
// The name of the handle.
|
|
1157
|
-
|
|
1161
|
+
readonly handle: string,
|
|
1158
1162
|
// The (storage) key at which the handle's data should be written by the
|
|
1159
1163
|
// handler.
|
|
1160
|
-
|
|
1164
|
+
readonly handleKey: string,
|
|
1161
1165
|
// The arguments applied to the handle
|
|
1162
|
-
|
|
1166
|
+
readonly handleArgs: Variables,
|
|
1163
1167
|
};
|
|
1164
1168
|
|
|
1165
1169
|
/**
|
|
@@ -1181,15 +1185,15 @@ export type HandleFieldPayload = {
|
|
|
1181
1185
|
*
|
|
1182
1186
|
*/
|
|
1183
1187
|
export type ModuleImportPayload = {
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1188
|
+
readonly kind: 'ModuleImportPayload',
|
|
1189
|
+
readonly args: ?ReadonlyArray<NormalizationArgument>,
|
|
1190
|
+
readonly data: PayloadData,
|
|
1191
|
+
readonly dataID: DataID,
|
|
1192
|
+
readonly operationReference: unknown,
|
|
1193
|
+
readonly path: ReadonlyArray<string>,
|
|
1194
|
+
readonly typeName: string,
|
|
1195
|
+
readonly variables: Variables,
|
|
1196
|
+
readonly actorIdentifier: ?ActorIdentifier,
|
|
1193
1197
|
};
|
|
1194
1198
|
|
|
1195
1199
|
/**
|
|
@@ -1208,14 +1212,14 @@ export type ModuleImportPayload = {
|
|
|
1208
1212
|
* typeName can also be used to construct a root record for normalization.
|
|
1209
1213
|
*/
|
|
1210
1214
|
export type ActorPayload = {
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1215
|
+
readonly kind: 'ActorPayload',
|
|
1216
|
+
readonly data: PayloadData,
|
|
1217
|
+
readonly dataID: DataID,
|
|
1218
|
+
readonly node: NormalizationLinkedField,
|
|
1219
|
+
readonly path: ReadonlyArray<string>,
|
|
1220
|
+
readonly typeName: string,
|
|
1221
|
+
readonly variables: Variables,
|
|
1222
|
+
readonly actorIdentifier: ActorIdentifier,
|
|
1219
1223
|
};
|
|
1220
1224
|
|
|
1221
1225
|
/**
|
|
@@ -1229,22 +1233,22 @@ export type FollowupPayload = ModuleImportPayload | ActorPayload;
|
|
|
1229
1233
|
* arrives.
|
|
1230
1234
|
*/
|
|
1231
1235
|
export type DeferPlaceholder = {
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1236
|
+
readonly kind: 'defer',
|
|
1237
|
+
readonly data: PayloadData,
|
|
1238
|
+
readonly label: string,
|
|
1239
|
+
readonly path: ReadonlyArray<string>,
|
|
1240
|
+
readonly selector: NormalizationSelector,
|
|
1241
|
+
readonly typeName: string,
|
|
1242
|
+
readonly actorIdentifier: ?ActorIdentifier,
|
|
1239
1243
|
};
|
|
1240
1244
|
export type StreamPlaceholder = {
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1245
|
+
readonly kind: 'stream',
|
|
1246
|
+
readonly label: string,
|
|
1247
|
+
readonly path: ReadonlyArray<string>,
|
|
1248
|
+
readonly parentID: DataID,
|
|
1249
|
+
readonly node: NormalizationSelectableNode,
|
|
1250
|
+
readonly variables: Variables,
|
|
1251
|
+
readonly actorIdentifier: ?ActorIdentifier,
|
|
1248
1252
|
};
|
|
1249
1253
|
export type IncrementalDataPlaceholder = DeferPlaceholder | StreamPlaceholder;
|
|
1250
1254
|
|
|
@@ -1286,7 +1290,7 @@ export type StoreUpdater = (store: RecordSourceProxy) => void;
|
|
|
1286
1290
|
* order to easily access the root fields of a query/mutation as well as a
|
|
1287
1291
|
* second argument of the response object of the mutation.
|
|
1288
1292
|
*/
|
|
1289
|
-
export type SelectorStoreUpdater
|
|
1293
|
+
export type SelectorStoreUpdater<in TMutationResponse> = (
|
|
1290
1294
|
store: RecordSourceSelectorProxy,
|
|
1291
1295
|
data: ?TMutationResponse,
|
|
1292
1296
|
) => void;
|
|
@@ -1300,20 +1304,20 @@ export type OptimisticUpdate<TMutation extends MutationParameters> =
|
|
|
1300
1304
|
| OptimisticUpdateRelayPayload<TMutation>;
|
|
1301
1305
|
|
|
1302
1306
|
export type OptimisticUpdateFunction = {
|
|
1303
|
-
|
|
1307
|
+
readonly storeUpdater: StoreUpdater,
|
|
1304
1308
|
};
|
|
1305
1309
|
|
|
1306
1310
|
export type OptimisticUpdateRelayPayload<TMutation extends MutationParameters> =
|
|
1307
1311
|
{
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1312
|
+
readonly operation: OperationDescriptor,
|
|
1313
|
+
readonly payload: RelayResponsePayload,
|
|
1314
|
+
readonly updater: ?SelectorStoreUpdater<TMutation['response']>,
|
|
1311
1315
|
};
|
|
1312
1316
|
|
|
1313
1317
|
export type OptimisticResponseConfig<TMutation extends MutationParameters> = {
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1318
|
+
readonly operation: OperationDescriptor,
|
|
1319
|
+
readonly response: ?PayloadData,
|
|
1320
|
+
readonly updater: ?SelectorStoreUpdater<TMutation['response']>,
|
|
1317
1321
|
};
|
|
1318
1322
|
|
|
1319
1323
|
/**
|
|
@@ -1367,11 +1371,11 @@ export type MissingFieldHandler =
|
|
|
1367
1371
|
* https://relay.dev/docs/next/guides/throw-on-field-error-directive/
|
|
1368
1372
|
*/
|
|
1369
1373
|
export type MissingExpectedDataLogEvent = {
|
|
1370
|
-
|
|
1371
|
-
|
|
1374
|
+
readonly kind: 'missing_expected_data.log',
|
|
1375
|
+
readonly owner: string,
|
|
1372
1376
|
fieldPath: string, // Purposefully mutable to allow lazy construction in RelayReader
|
|
1373
1377
|
// To populate this, you should pass the value to a ReactRelayLoggingContext
|
|
1374
|
-
|
|
1378
|
+
readonly uiContext: unknown | void,
|
|
1375
1379
|
};
|
|
1376
1380
|
|
|
1377
1381
|
/**
|
|
@@ -1395,12 +1399,12 @@ export type MissingExpectedDataLogEvent = {
|
|
|
1395
1399
|
* `handled: true` and should not trigger a throw.
|
|
1396
1400
|
*/
|
|
1397
1401
|
export type MissingExpectedDataThrowEvent = {
|
|
1398
|
-
|
|
1399
|
-
|
|
1402
|
+
readonly kind: 'missing_expected_data.throw',
|
|
1403
|
+
readonly owner: string,
|
|
1400
1404
|
fieldPath: string, // Purposefully mutable to allow lazy construction in RelayReader
|
|
1401
|
-
|
|
1405
|
+
readonly handled: boolean,
|
|
1402
1406
|
// To populate this, you should pass the value to a ReactRelayLoggingContext
|
|
1403
|
-
|
|
1407
|
+
readonly uiContext: unknown | void,
|
|
1404
1408
|
};
|
|
1405
1409
|
|
|
1406
1410
|
/**
|
|
@@ -1408,11 +1412,11 @@ export type MissingExpectedDataThrowEvent = {
|
|
|
1408
1412
|
* store.
|
|
1409
1413
|
*/
|
|
1410
1414
|
export type MissingRequiredFieldLogEvent = {
|
|
1411
|
-
|
|
1412
|
-
|
|
1415
|
+
readonly kind: 'missing_required_field.log',
|
|
1416
|
+
readonly owner: string,
|
|
1413
1417
|
fieldPath: string, // Purposefully mutable to allow lazy construction in RelayReader
|
|
1414
1418
|
// To populate this, you should pass the value to a ReactRelayLoggingContext
|
|
1415
|
-
|
|
1419
|
+
readonly uiContext: unknown | void,
|
|
1416
1420
|
};
|
|
1417
1421
|
|
|
1418
1422
|
/**
|
|
@@ -1427,12 +1431,12 @@ export type MissingRequiredFieldLogEvent = {
|
|
|
1427
1431
|
* `handled: true` and should not trigger a throw.
|
|
1428
1432
|
*/
|
|
1429
1433
|
export type MissingRequiredFieldThrowEvent = {
|
|
1430
|
-
|
|
1431
|
-
|
|
1434
|
+
readonly kind: 'missing_required_field.throw',
|
|
1435
|
+
readonly owner: string,
|
|
1432
1436
|
fieldPath: string, // Purposefully mutable to allow lazy construction in RelayReader
|
|
1433
|
-
|
|
1437
|
+
readonly handled: boolean,
|
|
1434
1438
|
// To populate this, you should pass the value to a ReactRelayLoggingContext
|
|
1435
|
-
|
|
1439
|
+
readonly uiContext: unknown | void,
|
|
1436
1440
|
};
|
|
1437
1441
|
|
|
1438
1442
|
/**
|
|
@@ -1448,14 +1452,14 @@ export type MissingRequiredFieldThrowEvent = {
|
|
|
1448
1452
|
* `handled: true` and should not trigger a throw.
|
|
1449
1453
|
*/
|
|
1450
1454
|
export type RelayResolverErrorEvent = {
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1455
|
+
readonly kind: 'relay_resolver.error',
|
|
1456
|
+
readonly owner: string,
|
|
1457
|
+
readonly fieldPath: string,
|
|
1458
|
+
readonly error: Error,
|
|
1459
|
+
readonly shouldThrow: boolean,
|
|
1460
|
+
readonly handled: boolean,
|
|
1457
1461
|
// To populate this, you should pass the value to a ReactRelayLoggingContext
|
|
1458
|
-
|
|
1462
|
+
readonly uiContext: unknown | void,
|
|
1459
1463
|
};
|
|
1460
1464
|
|
|
1461
1465
|
/**
|
|
@@ -1476,14 +1480,14 @@ export type RelayResolverErrorEvent = {
|
|
|
1476
1480
|
* `handled: true` and should not trigger a throw.
|
|
1477
1481
|
*/
|
|
1478
1482
|
export type RelayFieldPayloadErrorEvent = {
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1483
|
+
readonly kind: 'relay_field_payload.error',
|
|
1484
|
+
readonly owner: string,
|
|
1485
|
+
readonly fieldPath: string,
|
|
1486
|
+
readonly error: TRelayFieldError,
|
|
1487
|
+
readonly shouldThrow: boolean,
|
|
1488
|
+
readonly handled: boolean,
|
|
1485
1489
|
// To populate this, you should pass the value to a ReactRelayLoggingContext
|
|
1486
|
-
|
|
1490
|
+
readonly uiContext: unknown | void,
|
|
1487
1491
|
};
|
|
1488
1492
|
|
|
1489
1493
|
/**
|
|
@@ -1506,19 +1510,19 @@ export type RelayFieldLogger = (event: RelayFieldLoggerEvent) => void;
|
|
|
1506
1510
|
* The results of normalizing a query.
|
|
1507
1511
|
*/
|
|
1508
1512
|
export type RelayResponsePayload = {
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1513
|
+
readonly errors: ?Array<PayloadError>,
|
|
1514
|
+
readonly fieldPayloads: ?Array<HandleFieldPayload>,
|
|
1515
|
+
readonly incrementalPlaceholders: ?Array<IncrementalDataPlaceholder>,
|
|
1516
|
+
readonly followupPayloads: ?Array<FollowupPayload>,
|
|
1517
|
+
readonly isFinal: boolean,
|
|
1518
|
+
readonly isPreNormalized?: boolean,
|
|
1519
|
+
readonly s2cExecutions?: ?ReadonlyArray<{
|
|
1520
|
+
readonly recordID: DataID,
|
|
1521
|
+
readonly selections: ReadonlyArray<NormalizationSelection>,
|
|
1522
|
+
readonly typeName: string,
|
|
1519
1523
|
}>,
|
|
1520
|
-
|
|
1521
|
-
|
|
1524
|
+
readonly source: MutableRecordSource,
|
|
1525
|
+
readonly storeUpdater?: ?(store: RecordSourceProxy) => void,
|
|
1522
1526
|
};
|
|
1523
1527
|
|
|
1524
1528
|
/**
|
|
@@ -1591,7 +1595,7 @@ export interface PublishQueue {
|
|
|
1591
1595
|
* can only come from a given set.
|
|
1592
1596
|
*/
|
|
1593
1597
|
export type ConcreteClientEdgeResolverReturnType<T = any> = {
|
|
1594
|
-
|
|
1598
|
+
readonly id: T & DataID,
|
|
1595
1599
|
};
|
|
1596
1600
|
|
|
1597
1601
|
/**
|
|
@@ -1604,7 +1608,7 @@ export type ConcreteClientEdgeResolverReturnType<T = any> = {
|
|
|
1604
1608
|
* that the provider of the LiveState value confirms that the value has indeed
|
|
1605
1609
|
* change before notifying Relay of the change.
|
|
1606
1610
|
*/
|
|
1607
|
-
export type LiveState
|
|
1611
|
+
export type LiveState<out T> = {
|
|
1608
1612
|
/**
|
|
1609
1613
|
* Returns the current value of the live state.
|
|
1610
1614
|
*/
|