According to the docs, composition of enums uses either the union or intersection strategy depending on whether the enum is used in only “outbound” operations or “inbound” ones too.
I assumed this implied that rover would never treat a difference in enum membership as an error when checking a subgraph schema.
However I’m getting an error from performing a rover check of the form:
+ npx -p @apollo/rover rover subgraph check MyGraph@demo --name foo --schema ./schema.gql
Checking the proposed schema for subgraph foo against MyGraph@demo
error[E029]: Encountered 1 build error while trying to build subgraph "foo" into supergraph "MyGraph@demo".
Caused by:
UNKNOWN: Enum type "Color" is used as both input type (for example ...) and
output type (for example, ...), but value "RED" is not defined in all the subgraphs defining "Color":
"RED" is defined in subgraph "bar" but not in subgraph "foo"
The changes in the schema you proposed for subgraph foo are incompatible with
supergraph MyGraph@demo
Is this expected, or is it a bug. It seems that if there is a composition strategy for enums, then as long as the strategy does not result in an empty enum it should not result in a subgraph check error.
I’m running rover 0.7.0