apollo-rs icon indicating copy to clipboard operation
apollo-rs copied to clipboard

Implement `@oneOf` input unions

Open goto-bus-stop opened this issue 1 year ago • 1 comments

What will we need, beyond validation?

https://github.com/graphql/graphql-spec/pull/825

goto-bus-stop avatar Jul 19 '24 07:07 goto-bus-stop

Based on a first skim of the proposed spec:

  • A new built-in directive definition
  • Some new schema validation rules
  • A new rule for input coercion
    • In validation, for literal object values
    • In the execution engine, for variables (even though introspection, the only user of this engine for now, does not use @oneOf)
  • A new schema-introspection field

SimonSapin avatar Jul 19 '24 12:07 SimonSapin

This would be a very great enhancement for the whole apollo stack, as currently it can't be used with rover and other federation tools. On the other hand, e.g. apollo client kotlin already supports it but requests oneOf related properties when performing introspection - which makes it incompatible with the current rover implementation.

mmuth avatar Aug 04 '25 08:08 mmuth

Just wondering if this is on any roadmap at present?

olliejm avatar Oct 02 '25 12:10 olliejm

@olliejm this is on the roadmap. We have this along with the rest of GraphQL spec changes slotted for Q4 this year/ early Q1 next year.

lrlna avatar Oct 02 '25 12:10 lrlna