Skip to content

Conversation

glen-84
Copy link
Collaborator

@glen-84 glen-84 commented Jun 10, 2025

Summary of the changes (Less than 80 chars)

  • Aligned the OneOf implementation with the specification.

  • Updated the OneOf directive description.
  • Renamed Oneof/oneof to OneOf.
  • Renamed __Type.oneOf to __Type.isOneOf.
  • Added test for { a: null }.
  • Updated tests.
  • Moved validation from OneOf-specific rule to VariablesInAllowedPositions.

❓ Questions:

  • How should we handle this change? (see Slack)
  • "The @oneOf directive must not be provided by an Input Object type extension."
    • How should we handle this? Is this only for "real" extensions? Do we even support that? Does it apply to HC type extensions?
  • ✅ I'm not sure how to implement VariableVisitor.IsNonNullPosition based on the spec.
    • Note: 3 tests currently skipped.
  • Do we need to change something here?
  • ✅ Should we add it as a built-in directive to all "BuiltIns"-like classes? (ref)
  • Should we "unflag" it (remove config, on by default)? (seems to be the case in JS/Ruby and maybe Java).

@glen-84 glen-84 marked this pull request as draft June 10, 2025 14:00
@glen-84 glen-84 added this to the HC-16.0.0 milestone Jun 10, 2025
@glen-84 glen-84 force-pushed the gai/one-of-alignment branch from 4b27509 to 3e96bca Compare June 13, 2025 10:19
@glen-84 glen-84 force-pushed the gai/one-of-alignment branch from 6229b24 to f4b1b5a Compare June 13, 2025 13:18
@glen-84 glen-84 marked this pull request as ready for review June 13, 2025 13:35
@glen-84 glen-84 marked this pull request as draft June 26, 2025 07:38
@glen-84 glen-84 marked this pull request as ready for review July 7, 2025 09:46
@michaelstaib
Copy link
Member

@glen-84 can we get this back on track?

@glen-84
Copy link
Collaborator Author

glen-84 commented Aug 30, 2025

@michaelstaib I've merged main. It should be ready now.

@michaelstaib michaelstaib merged commit aa58ed0 into main Sep 1, 2025
109 checks passed
@michaelstaib michaelstaib deleted the gai/one-of-alignment branch September 1, 2025 16:46
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (d8ed7ba) to head (631f510).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #8352   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants