## Enum was used as both an input and output but was inconsistently defined across inclusive subgraphs

When you receive an error like `Enum X was used as both an input and output but was inconsistently defined across inclusive subgraphs` it means you are publishing a change to an enum that is used as both an input and an output. When publishing a new enum value to a subgraph, depending on whether that enum is used as an input, output, or both, incompatibilities and run-time issues could arise.

For example, imagine _Subgraph A_ defines an enum with value _A_, and it is used as an input. However, _Subgraph B_ defines the same enum with values _A_ and _B_, and it is used as an output. Composition cannot add value _B_ to the federated graph because _Subgraph A_ is unaware of value _B_ and cannot accept it as a valid input. Similarly, composition also cannot remove value _B_ from the federated graph because then returning _B_ from _Subgraph B_ would be invalid.

In such an instance, the only way to prevent errors is to define the enum consistently across all subgraphs in which the enum appears. To solve this issue you should proceed as follows:

- in the origin graph, add _@inaccessible_ to _Enum.NewValue_
- in each other subgraph that define the enum, define _Enum.NewValue_ (no directive)
- after you have published the change to all subgraphs that define that enum, remove _@inaccessible_ from the origin subgraph and publish the change

This migration approach, while cumbersome, ensures that the federated contract is respected at all times, keeping your router safe from any run-time errors.
