lablup / lablup/backend.ai

@oneOf directive is stripped from supergraph schema during Apollo Rover composition

Open
#10,646 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

The @oneOf directive declared via gql_pydantic_input(one_of=True) is correctly generated in v2-schema.graphql but stripped from supergraph.graphql during rover supergraph compose.

Example:

- v2-schema.graphql: input NotificationChannelSpecInput @oneOf { ... }

- supergraph.graphql: input NotificationChannelSpecInput @join__type(graph: STRAWBERRY) { ... }

Cause: Apollo Rover strips custom directives that are not explicitly registered via @composeDirective during composition. The latest Rover version (v0.37.2) does not natively support @oneOf. The underlying apollo-rs library merged @oneOf support in March 2026, but this has not yet been released in a Rover version.

Related upstream issues:

- https://github.com/apollographql/federation/issues/3204

- https://github.com/apollographql/rover/issues/2049

- https://github.com/apollographql/apollo-rs/issues/882

JIRA Issue: BA-5492

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.