relay-runtime 9.0.0 → 10.1.0

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.
Files changed (142) hide show
  1. package/handlers/RelayDefaultHandlerProvider.js.flow +47 -0
  2. package/handlers/connection/ConnectionHandler.js.flow +549 -0
  3. package/handlers/connection/ConnectionInterface.js.flow +92 -0
  4. package/handlers/connection/MutationHandlers.js.flow +199 -0
  5. package/index.js +1 -1
  6. package/index.js.flow +335 -0
  7. package/lib/handlers/RelayDefaultHandlerProvider.js +20 -0
  8. package/lib/handlers/connection/ConnectionHandler.js +1 -3
  9. package/lib/handlers/connection/MutationHandlers.js +212 -0
  10. package/lib/index.js +14 -2
  11. package/lib/mutations/RelayDeclarativeMutationConfig.js +22 -45
  12. package/lib/mutations/RelayRecordProxy.js +1 -3
  13. package/lib/mutations/RelayRecordSourceMutator.js +1 -3
  14. package/lib/mutations/RelayRecordSourceProxy.js +1 -3
  15. package/lib/mutations/RelayRecordSourceSelectorProxy.js +1 -3
  16. package/lib/mutations/commitMutation.js +2 -3
  17. package/lib/mutations/validateMutation.js +40 -9
  18. package/lib/network/RelayObservable.js +9 -9
  19. package/lib/network/RelayQueryResponseCache.js +8 -6
  20. package/lib/query/GraphQLTag.js +2 -1
  21. package/lib/query/PreloadableQueryRegistry.js +70 -0
  22. package/lib/query/fetchQuery.js +2 -3
  23. package/lib/query/fetchQueryInternal.js +5 -14
  24. package/lib/store/DataChecker.js +200 -71
  25. package/lib/store/RelayConcreteVariables.js +6 -2
  26. package/lib/store/RelayModernEnvironment.js +124 -65
  27. package/lib/store/RelayModernFragmentSpecResolver.js +19 -14
  28. package/lib/store/RelayModernOperationDescriptor.js +6 -5
  29. package/lib/store/RelayModernQueryExecutor.js +122 -73
  30. package/lib/store/RelayModernRecord.js +14 -9
  31. package/lib/store/RelayModernSelector.js +6 -2
  32. package/lib/store/RelayModernStore.js +281 -131
  33. package/lib/store/RelayOperationTracker.js +35 -78
  34. package/lib/store/RelayOptimisticRecordSource.js +7 -5
  35. package/lib/store/RelayPublishQueue.js +2 -4
  36. package/lib/store/RelayReader.js +304 -52
  37. package/lib/store/RelayRecordSource.js +1 -3
  38. package/lib/store/RelayRecordSourceMapImpl.js +13 -18
  39. package/lib/store/RelayReferenceMarker.js +125 -14
  40. package/lib/store/RelayResponseNormalizer.js +261 -66
  41. package/lib/store/RelayStoreReactFlightUtils.js +47 -0
  42. package/lib/store/RelayStoreUtils.js +1 -0
  43. package/lib/store/StoreInspector.js +8 -8
  44. package/lib/store/TypeID.js +28 -0
  45. package/lib/store/cloneRelayScalarHandleSourceField.js +44 -0
  46. package/lib/store/defaultRequiredFieldLogger.js +18 -0
  47. package/lib/store/normalizeRelayPayload.js +6 -2
  48. package/lib/store/readInlineData.js +1 -1
  49. package/lib/subscription/requestSubscription.js +4 -3
  50. package/lib/util/NormalizationNode.js +1 -5
  51. package/lib/util/RelayConcreteNode.js +11 -6
  52. package/lib/util/RelayError.js +39 -9
  53. package/lib/util/RelayFeatureFlags.js +6 -3
  54. package/lib/util/RelayReplaySubject.js +3 -3
  55. package/lib/util/createPayloadFor3DField.js +7 -2
  56. package/lib/util/getFragmentIdentifier.js +12 -3
  57. package/lib/util/getOperation.js +33 -0
  58. package/lib/util/getRequestIdentifier.js +2 -2
  59. package/lib/util/isEmptyObject.js +25 -0
  60. package/lib/util/recycleNodesInto.js +6 -7
  61. package/lib/util/reportMissingRequiredFields.js +48 -0
  62. package/mutations/RelayDeclarativeMutationConfig.js.flow +380 -0
  63. package/mutations/RelayRecordProxy.js.flow +165 -0
  64. package/mutations/RelayRecordSourceMutator.js.flow +238 -0
  65. package/mutations/RelayRecordSourceProxy.js.flow +164 -0
  66. package/mutations/RelayRecordSourceSelectorProxy.js.flow +119 -0
  67. package/mutations/applyOptimisticMutation.js.flow +76 -0
  68. package/mutations/commitLocalUpdate.js.flow +24 -0
  69. package/mutations/commitMutation.js.flow +181 -0
  70. package/mutations/validateMutation.js.flow +242 -0
  71. package/network/ConvertToExecuteFunction.js.flow +49 -0
  72. package/network/RelayNetwork.js.flow +84 -0
  73. package/network/RelayNetworkTypes.js.flow +145 -0
  74. package/network/RelayObservable.js.flow +634 -0
  75. package/network/RelayQueryResponseCache.js.flow +111 -0
  76. package/package.json +2 -2
  77. package/query/GraphQLTag.js.flow +168 -0
  78. package/query/PreloadableQueryRegistry.js.flow +65 -0
  79. package/query/fetchQuery.js.flow +47 -0
  80. package/query/fetchQueryInternal.js.flow +343 -0
  81. package/relay-runtime.js +2 -2
  82. package/relay-runtime.min.js +2 -2
  83. package/store/ClientID.js.flow +43 -0
  84. package/store/DataChecker.js.flow +568 -0
  85. package/store/RelayConcreteVariables.js.flow +96 -0
  86. package/store/RelayModernEnvironment.js.flow +571 -0
  87. package/store/RelayModernFragmentSpecResolver.js.flow +438 -0
  88. package/store/RelayModernOperationDescriptor.js.flow +92 -0
  89. package/store/RelayModernQueryExecutor.js.flow +1345 -0
  90. package/store/RelayModernRecord.js.flow +403 -0
  91. package/store/RelayModernSelector.js.flow +455 -0
  92. package/store/RelayModernStore.js.flow +858 -0
  93. package/store/RelayOperationTracker.js.flow +164 -0
  94. package/store/RelayOptimisticRecordSource.js.flow +119 -0
  95. package/store/RelayPublishQueue.js.flow +401 -0
  96. package/store/RelayReader.js.flow +638 -0
  97. package/store/RelayRecordSource.js.flow +29 -0
  98. package/store/RelayRecordSourceMapImpl.js.flow +87 -0
  99. package/store/RelayRecordState.js.flow +37 -0
  100. package/store/RelayReferenceMarker.js.flow +324 -0
  101. package/store/RelayResponseNormalizer.js.flow +791 -0
  102. package/store/RelayStoreReactFlightUtils.js.flow +64 -0
  103. package/store/RelayStoreTypes.js.flow +958 -0
  104. package/store/RelayStoreUtils.js.flow +219 -0
  105. package/store/StoreInspector.js.flow +171 -0
  106. package/store/TypeID.js.flow +28 -0
  107. package/store/ViewerPattern.js.flow +26 -0
  108. package/store/cloneRelayHandleSourceField.js.flow +66 -0
  109. package/store/cloneRelayScalarHandleSourceField.js.flow +62 -0
  110. package/store/createFragmentSpecResolver.js.flow +55 -0
  111. package/store/createRelayContext.js.flow +44 -0
  112. package/store/defaultGetDataID.js.flow +27 -0
  113. package/store/defaultRequiredFieldLogger.js.flow +23 -0
  114. package/store/hasOverlappingIDs.js.flow +34 -0
  115. package/store/isRelayModernEnvironment.js.flow +27 -0
  116. package/store/normalizeRelayPayload.js.flow +51 -0
  117. package/store/readInlineData.js.flow +75 -0
  118. package/subscription/requestSubscription.js.flow +103 -0
  119. package/util/JSResourceTypes.flow.js.flow +20 -0
  120. package/util/NormalizationNode.js.flow +213 -0
  121. package/util/ReaderNode.js.flow +227 -0
  122. package/util/RelayConcreteNode.js.flow +99 -0
  123. package/util/RelayDefaultHandleKey.js.flow +17 -0
  124. package/util/RelayError.js.flow +62 -0
  125. package/util/RelayFeatureFlags.js.flow +37 -0
  126. package/util/RelayProfiler.js.flow +284 -0
  127. package/util/RelayReplaySubject.js.flow +135 -0
  128. package/util/RelayRuntimeTypes.js.flow +72 -0
  129. package/util/createPayloadFor3DField.js.flow +43 -0
  130. package/util/deepFreeze.js.flow +36 -0
  131. package/util/generateID.js.flow +21 -0
  132. package/util/getFragmentIdentifier.js.flow +76 -0
  133. package/util/getOperation.js.flow +40 -0
  134. package/util/getRelayHandleKey.js.flow +41 -0
  135. package/util/getRequestIdentifier.js.flow +42 -0
  136. package/util/isEmptyObject.js.flow +25 -0
  137. package/util/isPromise.js.flow +21 -0
  138. package/util/isScalarAndEqual.js.flow +26 -0
  139. package/util/recycleNodesInto.js.flow +87 -0
  140. package/util/reportMissingRequiredFields.js.flow +51 -0
  141. package/util/resolveImmediate.js.flow +30 -0
  142. package/util/stableCopy.js.flow +35 -0
@@ -0,0 +1,227 @@
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
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ // flowlint ambiguous-object-type:error
12
+
13
+ 'use strict';
14
+
15
+ import type {ConnectionMetadata} from '../handlers/connection/ConnectionHandler';
16
+ import type {ConcreteRequest} from './RelayConcreteNode';
17
+
18
+ export type ReaderFragmentSpread = {|
19
+ +kind: 'FragmentSpread',
20
+ +name: string,
21
+ +args: ?$ReadOnlyArray<ReaderArgument>,
22
+ |};
23
+
24
+ export type ReaderInlineDataFragmentSpread = {|
25
+ +kind: 'InlineDataFragmentSpread',
26
+ +name: string,
27
+ +selections: $ReadOnlyArray<ReaderSelection>,
28
+ |};
29
+
30
+ export type ReaderFragment = {|
31
+ +kind: 'Fragment',
32
+ +name: string,
33
+ +type: string,
34
+ +abstractKey: ?string,
35
+ +metadata: ?{|
36
+ +connection?: $ReadOnlyArray<ConnectionMetadata>,
37
+ +mask?: boolean,
38
+ +plural?: boolean,
39
+ +refetch?: ReaderRefetchMetadata,
40
+ |},
41
+ +argumentDefinitions: $ReadOnlyArray<ReaderArgumentDefinition>,
42
+ +selections: $ReadOnlyArray<ReaderSelection>,
43
+ |};
44
+
45
+ // Marker type for a @refetchable fragment
46
+ export type ReaderRefetchableFragment = {|
47
+ ...ReaderFragment,
48
+ +metadata: {|
49
+ +connection?: [ConnectionMetadata],
50
+ +refetch: ReaderRefetchMetadata,
51
+ |},
52
+ |};
53
+
54
+ // Marker Type for a @refetchable fragment with a single use of @connection
55
+ export type ReaderPaginationFragment = {|
56
+ ...ReaderFragment,
57
+ +metadata: {|
58
+ +connection: [ConnectionMetadata],
59
+ +refetch: {|
60
+ ...ReaderRefetchMetadata,
61
+ connection: ReaderPaginationMetadata,
62
+ |},
63
+ |},
64
+ |};
65
+
66
+ export type ReaderRefetchMetadata = {|
67
+ +connection: ?ReaderPaginationMetadata,
68
+ +operation: string | ConcreteRequest,
69
+ +fragmentPathInResult: Array<string>,
70
+ +identifierField?: ?string,
71
+ |};
72
+
73
+ // Stricter form of ConnectionMetadata
74
+ export type ReaderPaginationMetadata = {|
75
+ +backward: {|
76
+ +count: string,
77
+ +cursor: string,
78
+ |} | null,
79
+ +forward: {|
80
+ +count: string,
81
+ +cursor: string,
82
+ |} | null,
83
+ +path: $ReadOnlyArray<string>,
84
+ |};
85
+
86
+ export type ReaderInlineDataFragment = {|
87
+ +kind: 'InlineDataFragment',
88
+ +name: string,
89
+ |};
90
+
91
+ export type ReaderArgument =
92
+ | ReaderListValueArgument
93
+ | ReaderLiteralArgument
94
+ | ReaderObjectValueArgument
95
+ | ReaderVariableArgument;
96
+
97
+ export type ReaderArgumentDefinition = ReaderLocalArgument | ReaderRootArgument;
98
+
99
+ export type ReaderCondition = {|
100
+ +kind: 'Condition',
101
+ +passingValue: boolean,
102
+ +condition: string,
103
+ +selections: $ReadOnlyArray<ReaderSelection>,
104
+ |};
105
+
106
+ export type ReaderClientExtension = {|
107
+ +kind: 'ClientExtension',
108
+ +selections: $ReadOnlyArray<ReaderSelection>,
109
+ |};
110
+
111
+ export type ReaderField = ReaderScalarField | ReaderLinkedField;
112
+
113
+ export type ReaderRootArgument = {|
114
+ +kind: 'RootArgument',
115
+ +name: string,
116
+ |};
117
+
118
+ export type ReaderInlineFragment = {|
119
+ +kind: 'InlineFragment',
120
+ +selections: $ReadOnlyArray<ReaderSelection>,
121
+ +type: string,
122
+ +abstractKey: ?string,
123
+ |};
124
+
125
+ export type ReaderLinkedField = {|
126
+ +kind: 'LinkedField',
127
+ +alias: ?string,
128
+ +name: string,
129
+ +storageKey: ?string,
130
+ +args: ?$ReadOnlyArray<ReaderArgument>,
131
+ +concreteType: ?string,
132
+ +plural: boolean,
133
+ +selections: $ReadOnlyArray<ReaderSelection>,
134
+ |};
135
+
136
+ export type ReaderModuleImport = {|
137
+ +kind: 'ModuleImport',
138
+ +documentName: string,
139
+ +fragmentPropName: string,
140
+ +fragmentName: string,
141
+ |};
142
+
143
+ export type ReaderListValueArgument = {|
144
+ +kind: 'ListValue',
145
+ +name: string,
146
+ +items: $ReadOnlyArray<ReaderArgument | null>,
147
+ |};
148
+
149
+ export type ReaderLiteralArgument = {|
150
+ +kind: 'Literal',
151
+ +name: string,
152
+ +type?: ?string,
153
+ +value: mixed,
154
+ |};
155
+
156
+ export type ReaderLocalArgument = {|
157
+ +kind: 'LocalArgument',
158
+ +name: string,
159
+ +defaultValue: mixed,
160
+ |};
161
+
162
+ export type ReaderObjectValueArgument = {|
163
+ +kind: 'ObjectValue',
164
+ +name: string,
165
+ +fields: $ReadOnlyArray<ReaderArgument>,
166
+ |};
167
+
168
+ export type ReaderNode =
169
+ | ReaderCondition
170
+ | ReaderLinkedField
171
+ | ReaderFragment
172
+ | ReaderInlineFragment;
173
+
174
+ export type ReaderScalarField = {|
175
+ +kind: 'ScalarField',
176
+ +alias: ?string,
177
+ +name: string,
178
+ +args: ?$ReadOnlyArray<ReaderArgument>,
179
+ +storageKey: ?string,
180
+ |};
181
+
182
+ export type ReaderFlightField = {|
183
+ +kind: 'FlightField',
184
+ +alias: ?string,
185
+ +name: string,
186
+ +args: ?$ReadOnlyArray<ReaderArgument>,
187
+ +storageKey: ?string,
188
+ |};
189
+
190
+ export type ReaderDefer = {|
191
+ +kind: 'Defer',
192
+ +selections: $ReadOnlyArray<ReaderSelection>,
193
+ |};
194
+
195
+ export type ReaderStream = {|
196
+ +kind: 'Stream',
197
+ +selections: $ReadOnlyArray<ReaderSelection>,
198
+ |};
199
+
200
+ export type RequiredFieldAction = 'NONE' | 'LOG' | 'THROW';
201
+
202
+ export type ReaderRequiredField = {|
203
+ +kind: 'RequiredField',
204
+ +field: ReaderField,
205
+ +action: RequiredFieldAction,
206
+ +path: string,
207
+ |};
208
+
209
+ export type ReaderSelection =
210
+ | ReaderCondition
211
+ | ReaderClientExtension
212
+ | ReaderDefer
213
+ | ReaderField
214
+ | ReaderFlightField
215
+ | ReaderFragmentSpread
216
+ | ReaderInlineDataFragmentSpread
217
+ | ReaderInlineFragment
218
+ | ReaderModuleImport
219
+ | ReaderStream
220
+ | ReaderRequiredField;
221
+
222
+ export type ReaderVariableArgument = {|
223
+ +kind: 'Variable',
224
+ +name: string,
225
+ +type?: ?string,
226
+ +variableName: string,
227
+ |};
@@ -0,0 +1,99 @@
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
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ // flowlint ambiguous-object-type:error
12
+
13
+ 'use strict';
14
+
15
+ import type {
16
+ NormalizationOperation,
17
+ NormalizationSplitOperation,
18
+ } from './NormalizationNode';
19
+ import type {ReaderFragment, ReaderInlineDataFragment} from './ReaderNode';
20
+
21
+ /**
22
+ * Represents a common GraphQL request that can be executed, an `operation`
23
+ * containing information to normalize the results, and a `fragment` derived
24
+ * from that operation to read the response data (masking data from child
25
+ * fragments).
26
+ */
27
+ export type ConcreteRequest = {|
28
+ +kind: 'Request',
29
+ +fragment: ReaderFragment,
30
+ +operation: NormalizationOperation,
31
+ +params: RequestParameters,
32
+ |};
33
+
34
+ export type NormalizationRootNode =
35
+ | ConcreteRequest
36
+ | NormalizationSplitOperation;
37
+
38
+ /**
39
+ * Contains the parameters required for executing a GraphQL request.
40
+ * The operation can either be provided as a persisted `id` or `text`. If given
41
+ * in `text` format, a `cacheID` as a hash of the text should be set to be used
42
+ * for local caching.
43
+ */
44
+ export type RequestParameters =
45
+ | {|
46
+ +id: string,
47
+ +text: null,
48
+ // common fields
49
+ +name: string,
50
+ +operationKind: 'mutation' | 'query' | 'subscription',
51
+ +metadata: {[key: string]: mixed, ...},
52
+ |}
53
+ | {|
54
+ +cacheID: string,
55
+ +id: null,
56
+ +text: string,
57
+ // common fields
58
+ +name: string,
59
+ +operationKind: 'mutation' | 'query' | 'subscription',
60
+ +metadata: {[key: string]: mixed, ...},
61
+ |};
62
+
63
+ export type GeneratedNode =
64
+ | ConcreteRequest
65
+ | ReaderFragment
66
+ | ReaderInlineDataFragment
67
+ | NormalizationSplitOperation;
68
+
69
+ const RelayConcreteNode = {
70
+ CONDITION: 'Condition',
71
+ CLIENT_EXTENSION: 'ClientExtension',
72
+ DEFER: 'Defer',
73
+ CONNECTION: 'Connection',
74
+ FLIGHT_FIELD: 'FlightField',
75
+ FRAGMENT: 'Fragment',
76
+ FRAGMENT_SPREAD: 'FragmentSpread',
77
+ INLINE_DATA_FRAGMENT_SPREAD: 'InlineDataFragmentSpread',
78
+ INLINE_DATA_FRAGMENT: 'InlineDataFragment',
79
+ INLINE_FRAGMENT: 'InlineFragment',
80
+ LINKED_FIELD: 'LinkedField',
81
+ LINKED_HANDLE: 'LinkedHandle',
82
+ LITERAL: 'Literal',
83
+ LIST_VALUE: 'ListValue',
84
+ LOCAL_ARGUMENT: 'LocalArgument',
85
+ MODULE_IMPORT: 'ModuleImport',
86
+ REQUIRED_FIELD: 'RequiredField',
87
+ OBJECT_VALUE: 'ObjectValue',
88
+ OPERATION: 'Operation',
89
+ REQUEST: 'Request',
90
+ ROOT_ARGUMENT: 'RootArgument',
91
+ SCALAR_FIELD: 'ScalarField',
92
+ SCALAR_HANDLE: 'ScalarHandle',
93
+ SPLIT_OPERATION: 'SplitOperation',
94
+ STREAM: 'Stream',
95
+ TYPE_DISCRIMINATOR: 'TypeDiscriminator',
96
+ VARIABLE: 'Variable',
97
+ };
98
+
99
+ module.exports = RelayConcreteNode;
@@ -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
+ * @flow strict
8
+ * @format
9
+ */
10
+
11
+ // flowlint ambiguous-object-type:error
12
+
13
+ 'use strict';
14
+
15
+ module.exports = {
16
+ DEFAULT_HANDLE_KEY: '',
17
+ };
@@ -0,0 +1,62 @@
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
+ * @flow
8
+ * @format
9
+ */
10
+
11
+ // flowlint ambiguous-object-type:error
12
+
13
+ 'use strict';
14
+
15
+ /**
16
+ * @private
17
+ */
18
+ function createError(
19
+ type: 'fatal' | 'error' | 'warn' | 'info',
20
+ name: string,
21
+ messageFormat: string,
22
+ ...messageParams: Array<string | number | boolean>
23
+ ): Error {
24
+ let index = 0;
25
+ const message = messageFormat.replace(/%s/g, () =>
26
+ String(messageParams[index++]),
27
+ );
28
+ const err = new Error(message);
29
+ const error = Object.assign((err: any), {
30
+ name,
31
+ messageFormat,
32
+ messageParams,
33
+ type,
34
+ taalOpcodes: [2, 2], // skip frame (code=2) twice
35
+ });
36
+ // In V8, Error objects keep the closure scope chain alive until the
37
+ // err.stack property is accessed.
38
+ if (error.stack === undefined) {
39
+ // IE sets the stack only if error is thrown
40
+ try {
41
+ throw error;
42
+ } catch {}
43
+ }
44
+ return error;
45
+ }
46
+
47
+ module.exports = {
48
+ create(
49
+ name: string,
50
+ messageFormat: string,
51
+ ...messageParams: Array<string | number | boolean>
52
+ ): Error {
53
+ return createError('error', name, messageFormat, ...messageParams);
54
+ },
55
+ createWarning(
56
+ name: string,
57
+ messageFormat: string,
58
+ ...messageParams: Array<string | number | boolean>
59
+ ): Error {
60
+ return createError('warn', name, messageFormat, ...messageParams);
61
+ },
62
+ };
@@ -0,0 +1,37 @@
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
+ * @flow strict
8
+ * @format
9
+ */
10
+
11
+ // flowlint ambiguous-object-type:error
12
+
13
+ 'use strict';
14
+
15
+ type FeatureFlags = {|
16
+ ENABLE_VARIABLE_CONNECTION_KEY: boolean,
17
+ ENABLE_PARTIAL_RENDERING_DEFAULT: boolean,
18
+ ENABLE_RELAY_CONTAINERS_SUSPENSE: boolean,
19
+ ENABLE_PRECISE_TYPE_REFINEMENT: boolean,
20
+ ENABLE_REACT_FLIGHT_COMPONENT_FIELD: boolean,
21
+ ENABLE_REQUIRED_DIRECTIVES: boolean | string,
22
+ ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION: boolean,
23
+ ENABLE_FRIENDLY_QUERY_NAME_GQL_URL: boolean,
24
+ |};
25
+
26
+ const RelayFeatureFlags: FeatureFlags = {
27
+ ENABLE_VARIABLE_CONNECTION_KEY: false,
28
+ ENABLE_PARTIAL_RENDERING_DEFAULT: false,
29
+ ENABLE_RELAY_CONTAINERS_SUSPENSE: false,
30
+ ENABLE_PRECISE_TYPE_REFINEMENT: false,
31
+ ENABLE_REACT_FLIGHT_COMPONENT_FIELD: false,
32
+ ENABLE_REQUIRED_DIRECTIVES: false,
33
+ ENABLE_GETFRAGMENTIDENTIFIER_OPTIMIZATION: false,
34
+ ENABLE_FRIENDLY_QUERY_NAME_GQL_URL: false,
35
+ };
36
+
37
+ module.exports = RelayFeatureFlags;