relay-compiler 16.1.0 → 17.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-extensions.graphql +50 -2
- package/win-x64/relay.exe +0 -0
package/README.md
CHANGED
@@ -68,7 +68,7 @@ file sources, and "listen" to the file changes in the "watch" mode. If
|
|
68
68
|
enabling this the babel plugin needs `artifactDirectory` to be set as well.
|
69
69
|
[string]
|
70
70
|
- `excludes` Directories to ignore under `src`. [array] [default:
|
71
|
-
["
|
71
|
+
["\*\*/node_modules/\*\*", "\*\*/__mocks__/\*\*", "\*\*/__generated__/\*\*"]]
|
72
72
|
- `schemaExtensions` List of directories with schema extensions. [array]
|
73
73
|
- `schemaConfig`
|
74
74
|
- `nodeInterfaceIdField` Configure the name of the globally unique ID field on
|
@@ -83,8 +83,8 @@ file sources, and "listen" to the file changes in the "watch" mode. If
|
|
83
83
|
the future. Enabling this means you will have to update your application
|
84
84
|
whenever the GraphQL server schema adds new enum values to prevent it from
|
85
85
|
breaking. [boolean][default: false]
|
86
|
-
- `
|
87
|
-
GraphQL types, for type emission purposes. [object]
|
86
|
+
- `customScalarTypes` Mappings from custom scalars in your schema to built-in
|
87
|
+
GraphQL types, for type emission purposes (eg. {"GqlScalar": "TStype"}). [object]
|
88
88
|
- `eagerEsModules` This option enables emitting ES modules artifacts.
|
89
89
|
[boolean][default: false]
|
90
90
|
- `persistConfig` Relay supports two versions of the config:
|
@@ -96,11 +96,14 @@ file sources, and "listen" to the file changes in the "watch" mode. If
|
|
96
96
|
contain additional parameters to send. [object]
|
97
97
|
- `concurrency` The maximum number concurrent requests that will be made to
|
98
98
|
`url`. Use a value greater than 0. [number]
|
99
|
-
|
99
|
+
- `include_query_text` Boolean, whether to include the query text in the
|
100
|
+
generated files. [boolean] [default: false]
|
100
101
|
- - **Local Persisting:**
|
101
102
|
- `file` Path for the JSON file that will contain operations map. Compiler
|
102
103
|
will write queries in the format: { "md5(queryText) => "queryText", ...}.
|
103
104
|
[string]
|
105
|
+
- `include_query_text` Boolean, whether to include the query text in the
|
106
|
+
generated files. [boolean] [default: false]
|
104
107
|
|
105
108
|
- `codegenCommand` Command name that for relay compiler. [string]
|
106
109
|
|
package/linux-arm64/relay
CHANGED
Binary file
|
package/linux-x64/relay
CHANGED
Binary file
|
package/macos-arm64/relay
CHANGED
Binary file
|
package/macos-x64/relay
CHANGED
Binary file
|
package/package.json
CHANGED
package/relay-extensions.graphql
CHANGED
@@ -22,6 +22,19 @@ directive @no_inline(raw_response_type: Boolean) on FRAGMENT_DEFINITION
|
|
22
22
|
"""
|
23
23
|
(Relay only)
|
24
24
|
|
25
|
+
A directive added to queries and fragments which causes the Relay client to throw
|
26
|
+
if reading a field that has an error. Relay will also honor the @semanticNonNull
|
27
|
+
direcitve on fields read from that query or fragment. Emitted types for such
|
28
|
+
fields will be non-null. Requires the `experimental_emit_semantic_nullability_types`
|
29
|
+
typegen configuration to be enabled.
|
30
|
+
|
31
|
+
[Read More](https://relay.dev/docs/api-reference/graphql-and-directives/)
|
32
|
+
"""
|
33
|
+
directive @throwOnFieldError on QUERY | FRAGMENT_DEFINITION
|
34
|
+
|
35
|
+
"""
|
36
|
+
(Relay only)
|
37
|
+
|
25
38
|
A directive added to queries which tells Relay to generate types that cover
|
26
39
|
the `optimisticResponse` parameter to `commitMutation`.
|
27
40
|
|
@@ -45,6 +58,7 @@ types, or on a type that implements `Node` (i.e. a type that has an id).
|
|
45
58
|
directive @refetchable(
|
46
59
|
queryName: String!
|
47
60
|
directives: [String!]
|
61
|
+
preferFetchable: Boolean
|
48
62
|
) on FRAGMENT_DEFINITION
|
49
63
|
|
50
64
|
"""
|
@@ -141,6 +155,17 @@ enum RequiredFieldAction {
|
|
141
155
|
THROW
|
142
156
|
}
|
143
157
|
|
158
|
+
# CatchTransform
|
159
|
+
"""
|
160
|
+
(Relay Only)
|
161
|
+
|
162
|
+
NULL and RESULT are the `to` values you can use in the @catch directive to tell relay how to treat field-level errors
|
163
|
+
"""
|
164
|
+
enum CatchFieldTo {
|
165
|
+
NULL
|
166
|
+
RESULT
|
167
|
+
}
|
168
|
+
|
144
169
|
"""
|
145
170
|
(Relay Only)
|
146
171
|
|
@@ -153,6 +178,14 @@ null".
|
|
153
178
|
"""
|
154
179
|
directive @required(action: RequiredFieldAction! @static) on FIELD
|
155
180
|
|
181
|
+
"""
|
182
|
+
(Relay Only)
|
183
|
+
|
184
|
+
`@catch` is a directive you can add to fields in your Relay queries to
|
185
|
+
declare how errors are handled.
|
186
|
+
"""
|
187
|
+
directive @catch(to: CatchFieldTo! = RESULT @static) on FIELD
|
188
|
+
|
156
189
|
# DeclarativeConnection
|
157
190
|
"""
|
158
191
|
(Relay Only)
|
@@ -257,7 +290,7 @@ directive @RelayOutputType on OBJECT
|
|
257
290
|
|
258
291
|
Marks a given query or fragment as updatable.
|
259
292
|
|
260
|
-
[Read More](https://
|
293
|
+
[Read More](https://relay.dev/docs/next/guided-tour/updating-data/imperatively-modifying-linked-fields/)
|
261
294
|
"""
|
262
295
|
directive @updatable on QUERY | FRAGMENT_DEFINITION
|
263
296
|
|
@@ -266,7 +299,7 @@ directive @updatable on QUERY | FRAGMENT_DEFINITION
|
|
266
299
|
|
267
300
|
Marks a given fragment as assignable.
|
268
301
|
|
269
|
-
[Read More](https://
|
302
|
+
[Read More](https://relay.dev/docs/next/guided-tour/updating-data/imperatively-modifying-linked-fields/)
|
270
303
|
"""
|
271
304
|
directive @assignable on FRAGMENT_DEFINITION
|
272
305
|
|
@@ -275,12 +308,27 @@ directive @assignable on FRAGMENT_DEFINITION
|
|
275
308
|
|
276
309
|
Exposes a fragment's data as a new field which can be null checked to ensure it
|
277
310
|
matches the parent selection.
|
311
|
+
|
312
|
+
[Read More](https://relay.dev/docs/next/guides/alias-directive/)
|
278
313
|
"""
|
279
314
|
directive @alias(as: String) on FRAGMENT_SPREAD | INLINE_FRAGMENT
|
280
315
|
|
281
316
|
"""
|
282
317
|
(Relay Only)
|
283
318
|
|
319
|
+
This directive allows users to opt out of validation which enforces that @alias
|
320
|
+
be used on all fragment spreads which might not match. It is intended as an
|
321
|
+
escape hatch for incremental adoption of enforcing `@alias`.
|
322
|
+
|
323
|
+
DO NOT ADD NEW USES OF THIS DIRECTIVE.
|
324
|
+
|
325
|
+
[Read More](https://relay.dev/docs/next/guides/alias-directive/)
|
326
|
+
"""
|
327
|
+
directive @dangerously_unaliased_fixme on FRAGMENT_SPREAD
|
328
|
+
|
329
|
+
"""
|
330
|
+
(Relay Only)
|
331
|
+
|
284
332
|
Indicates that a given directive argument is expected to be provided statically.
|
285
333
|
If a non-static value is provided, it will result in a validation error.
|
286
334
|
|
package/win-x64/relay.exe
CHANGED
Binary file
|