Merging enum and input types

I am using federation v2. I have defined one enum type that is shared in two subgraphs. Now according to docs the composition of supergraph sdl should merge this enum from both subgraphs and it should contain all the values provided in subgraphs. But supergraph schema is having only common values between the two.

Input

subgraph schema 1

enum Color {
  RED
  GREEN
  BLUE
}

subgraph schema 2

enum Color {
  CYAN
  MAGENTA
  YELLOW
  RED
}

supergraph schema generated

enum {
  RED
}

supergraph schema expected

enum Color {
  CYAN
  MAGENTA
  YELLOW
  RED
  GREEN
  BLUE
}

And if there is no common value between the two then composition throws error like

None of the values of enum type "Color" are defined consistently in all the subgraphs defining that type. As only values common to all subgraphs are merged, this would result in an empty type.

Same is happening with input types also.

I am using InterospectAndCompose API for composing supergraph sdl.