File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
compiler/crates/relay-schema/src Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -318,9 +318,17 @@ directive @alias(as: String) on FRAGMENT_SPREAD | INLINE_FRAGMENT
318
318
"""
319
319
(Relay Only)
320
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`.
321
+ **To resolve, replace `@dangerously_unaliased_fixme` with `@alias`**
322
+
323
+ This fragment spread will only conditionally be fetched, either due to
324
+ `@skip`/@include` or its type condition. Conditionally fetched fragments without
325
+ an `@alias` are unsafe because they don't expose any mechanism for the user to
326
+ check if the data was fetched before using the fragment. In these cases `@alias`
327
+ will materialize the fragment as a nullable named property, ensuring the proper
328
+ null checks are performed.
329
+
330
+ We now require all such fragment spreads to use `@alias`, and have marked
331
+ existing unsafe spreads with `@dangerously_unaliased_fixme`.
324
332
325
333
DO NOT ADD NEW USES OF THIS DIRECTIVE.
326
334
You can’t perform that action at this time.
0 commit comments