Skip to content

Conversation

@zth
Copy link
Owner

@zth zth commented Dec 15, 2025

Note

Enable @exhaustive/@nonExhaustive on inline fragments with full validation, new error messaging, parent-type tracking, and comprehensive tests.

  • Schema:
    • Extend @exhaustive and @nonExhaustive directives to INLINE_FRAGMENT in compiler/crates/relay-schema/src/relay-extensions.graphql.
  • Validation:
    • Add inline fragment exhaustive validation (validate_exhaustive_inline_fragment) with selection checks and parent_type context propagation across operations, fields, fragments, and inline fragments.
    • Introduce MissingExhaustiveMembersOnInlineFragment error and broaden non-union/interface error message to include inline fragments.
    • Helpers to detect object coverage within inline fragments.
  • Tests:
    • New fixtures for inline fragment exhaustive coverage (valid, missing member, alias, auto-type missing) and hook into auto-exhaustive types for inline-fragment cases.
    • Update expected message for directive-on-non-union to mention inline fragments.
    • Register new tests in validate_exhaustive_directive_test.rs.

Written by Cursor Bugbot for commit f1ac3d5. This will update automatically on new commits. Configure here.

@zth zth merged commit 0ad37ba into rescriptrelay-2.0 Dec 15, 2025
21 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants