relay-compiler 16.2.0 → 18.0.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.
- package/README.md +7 -4
- package/linux-arm64/relay +0 -0
- package/linux-x64/relay +0 -0
- package/macos-arm64/relay +0 -0
- package/macos-x64/relay +0 -0
- package/package.json +1 -1
- package/relay-compiler-config-schema.json +4704 -0
- package/relay-extensions.graphql +59 -9
- package/win-x64/relay.exe +0 -0
package/relay-extensions.graphql
CHANGED
@@ -3,7 +3,9 @@
|
|
3
3
|
# This source code is licensed under the MIT license found in the
|
4
4
|
# LICENSE file in the root directory of this source tree.
|
5
5
|
|
6
|
-
directive @relay_test_operation
|
6
|
+
directive @relay_test_operation(
|
7
|
+
DO_NOT_USE_use_in_production: Boolean = false @static
|
8
|
+
) on QUERY | MUTATION | SUBSCRIPTION
|
7
9
|
|
8
10
|
"""
|
9
11
|
(Relay only)
|
@@ -22,6 +24,19 @@ directive @no_inline(raw_response_type: Boolean) on FRAGMENT_DEFINITION
|
|
22
24
|
"""
|
23
25
|
(Relay only)
|
24
26
|
|
27
|
+
A directive added to queries and fragments which causes the Relay client to throw
|
28
|
+
if reading a field that has an error. Relay will also honor the @semanticNonNull
|
29
|
+
direcitve on fields read from that query or fragment. Emitted types for such
|
30
|
+
fields will be non-null. Requires the `experimental_emit_semantic_nullability_types`
|
31
|
+
typegen configuration to be enabled.
|
32
|
+
|
33
|
+
[Read More](https://relay.dev/docs/api-reference/graphql-and-directives/)
|
34
|
+
"""
|
35
|
+
directive @throwOnFieldError on QUERY | FRAGMENT_DEFINITION
|
36
|
+
|
37
|
+
"""
|
38
|
+
(Relay only)
|
39
|
+
|
25
40
|
A directive added to queries which tells Relay to generate types that cover
|
26
41
|
the `optimisticResponse` parameter to `commitMutation`.
|
27
42
|
|
@@ -45,6 +60,7 @@ types, or on a type that implements `Node` (i.e. a type that has an id).
|
|
45
60
|
directive @refetchable(
|
46
61
|
queryName: String!
|
47
62
|
directives: [String!]
|
63
|
+
preferFetchable: Boolean
|
48
64
|
) on FRAGMENT_DEFINITION
|
49
65
|
|
50
66
|
"""
|
@@ -141,6 +157,17 @@ enum RequiredFieldAction {
|
|
141
157
|
THROW
|
142
158
|
}
|
143
159
|
|
160
|
+
# CatchTransform
|
161
|
+
"""
|
162
|
+
(Relay Only)
|
163
|
+
|
164
|
+
NULL and RESULT are the `to` values you can use in the @catch directive to tell relay how to treat field-level errors
|
165
|
+
"""
|
166
|
+
enum CatchFieldTo {
|
167
|
+
NULL
|
168
|
+
RESULT
|
169
|
+
}
|
170
|
+
|
144
171
|
"""
|
145
172
|
(Relay Only)
|
146
173
|
|
@@ -149,10 +176,18 @@ declare how null values should be handled at runtime. You can think of it as
|
|
149
176
|
saying "if this field is ever null, its parent field is invalid and should be
|
150
177
|
null".
|
151
178
|
|
152
|
-
[Read More](https://
|
179
|
+
[Read More](https://relay.dev/docs/guides/required-directive/)
|
153
180
|
"""
|
154
181
|
directive @required(action: RequiredFieldAction! @static) on FIELD
|
155
182
|
|
183
|
+
"""
|
184
|
+
(Relay Only)
|
185
|
+
|
186
|
+
`@catch` is a directive you can add to fields in your Relay queries to
|
187
|
+
declare how errors are handled.
|
188
|
+
"""
|
189
|
+
directive @catch(to: CatchFieldTo! = RESULT @static) on FIELD
|
190
|
+
|
156
191
|
# DeclarativeConnection
|
157
192
|
"""
|
158
193
|
(Relay Only)
|
@@ -180,7 +215,7 @@ directive @deleteEdge(connections: [ID!]!) on FIELD
|
|
180
215
|
For use within mutations. After the mutation request is complete, this edge
|
181
216
|
will be appended to its parent connection.
|
182
217
|
|
183
|
-
[Read More](https://relay.dev/docs/guided-tour/
|
218
|
+
[Read More](https://relay.dev/docs/guided-tour/list-data/updating-connections/#appendedge--prependedge)
|
184
219
|
"""
|
185
220
|
directive @appendEdge(connections: [ID!]!) on FIELD
|
186
221
|
|
@@ -190,7 +225,7 @@ directive @appendEdge(connections: [ID!]!) on FIELD
|
|
190
225
|
For use within mutations. After the mutation request is complete, this edge
|
191
226
|
will be prepended to its parent connection.
|
192
227
|
|
193
|
-
[Read More](https://relay.dev/docs/guided-tour/
|
228
|
+
[Read More](https://relay.dev/docs/guided-tour/list-data/updating-connections/#appendedge--prependedge)
|
194
229
|
"""
|
195
230
|
directive @prependEdge(connections: [ID!]!) on FIELD
|
196
231
|
|
@@ -200,7 +235,7 @@ directive @prependEdge(connections: [ID!]!) on FIELD
|
|
200
235
|
For use within mutations. After the mutation request is complete, this node
|
201
236
|
will be appended to its parent connection.
|
202
237
|
|
203
|
-
[Read More](https://relay.dev/docs/guided-tour/
|
238
|
+
[Read More](https://relay.dev/docs/guided-tour/list-data/updating-connections/#appendnode--prependnode)
|
204
239
|
"""
|
205
240
|
directive @appendNode(connections: [ID!]!, edgeTypeName: String!) on FIELD
|
206
241
|
|
@@ -210,7 +245,7 @@ directive @appendNode(connections: [ID!]!, edgeTypeName: String!) on FIELD
|
|
210
245
|
For use within mutations. After the mutation request is complete, this node
|
211
246
|
will be prepended to its parent connection.
|
212
247
|
|
213
|
-
[Read More](https://relay.dev/docs/guided-tour/
|
248
|
+
[Read More](https://relay.dev/docs/guided-tour/list-data/updating-connections/#appendnode--prependnode)
|
214
249
|
"""
|
215
250
|
directive @prependNode(connections: [ID!]!, edgeTypeName: String!) on FIELD
|
216
251
|
|
@@ -236,7 +271,7 @@ A special scalar type which can be used as the return type of a Relay Resolver.
|
|
236
271
|
When used, the resolver field will derive its TypeScript/Flow type from the
|
237
272
|
return value of the Resolver function.
|
238
273
|
|
239
|
-
[Learn More](https://relay.dev/docs/
|
274
|
+
[Learn More](https://relay.dev/docs/guides/relay-resolvers/return-types/#javascript-values)
|
240
275
|
"""
|
241
276
|
scalar RelayResolverValue
|
242
277
|
|
@@ -257,7 +292,7 @@ directive @RelayOutputType on OBJECT
|
|
257
292
|
|
258
293
|
Marks a given query or fragment as updatable.
|
259
294
|
|
260
|
-
[Read More](https://
|
295
|
+
[Read More](https://relay.dev/docs/guided-tour/updating-data/imperatively-modifying-linked-fields/)
|
261
296
|
"""
|
262
297
|
directive @updatable on QUERY | FRAGMENT_DEFINITION
|
263
298
|
|
@@ -266,7 +301,7 @@ directive @updatable on QUERY | FRAGMENT_DEFINITION
|
|
266
301
|
|
267
302
|
Marks a given fragment as assignable.
|
268
303
|
|
269
|
-
[Read More](https://
|
304
|
+
[Read More](https://relay.dev/docs/guided-tour/updating-data/imperatively-modifying-linked-fields/)
|
270
305
|
"""
|
271
306
|
directive @assignable on FRAGMENT_DEFINITION
|
272
307
|
|
@@ -275,12 +310,27 @@ directive @assignable on FRAGMENT_DEFINITION
|
|
275
310
|
|
276
311
|
Exposes a fragment's data as a new field which can be null checked to ensure it
|
277
312
|
matches the parent selection.
|
313
|
+
|
314
|
+
[Read More](https://relay.dev/docs/guides/alias-directive/)
|
278
315
|
"""
|
279
316
|
directive @alias(as: String) on FRAGMENT_SPREAD | INLINE_FRAGMENT
|
280
317
|
|
281
318
|
"""
|
282
319
|
(Relay Only)
|
283
320
|
|
321
|
+
This directive allows users to opt out of validation which enforces that @alias
|
322
|
+
be used on all fragment spreads which might not match. It is intended as an
|
323
|
+
escape hatch for incremental adoption of enforcing `@alias`.
|
324
|
+
|
325
|
+
DO NOT ADD NEW USES OF THIS DIRECTIVE.
|
326
|
+
|
327
|
+
[Read More](https://relay.dev/docs/guides/alias-directive/)
|
328
|
+
"""
|
329
|
+
directive @dangerously_unaliased_fixme on FRAGMENT_SPREAD
|
330
|
+
|
331
|
+
"""
|
332
|
+
(Relay Only)
|
333
|
+
|
284
334
|
Indicates that a given directive argument is expected to be provided statically.
|
285
335
|
If a non-static value is provided, it will result in a validation error.
|
286
336
|
|
package/win-x64/relay.exe
CHANGED
Binary file
|