Check and composition for multiple subgraphs depending on each other on type

I have a scenario of 3 subgraphs that share a type.

The type is defined as Article and is used by three different subgraphs. Now, the issue is that I need to add a new @key, I raised a proposal and the proposal is passing successfully. The issue is when running the scheme check for each subgraph independently, it fails as they depend on each other.

They all fail to check or publish, and composition fails as they depend on each other.

I tried rover subgraph publish and rover subgraph check but does not allow multiple subgraphs.

So, a solution that allowed us to have a successful composition was to add a second @key directive that would not cause a composition error and then a second set of changes that would remove the key directive with the incomplete list.

This composition does not fail during the check or publish of any subgraph.

type Article
  @key(fields: "fieldX fieldY fieldD")
  @key(fields: "fieldX fieldY fieldD newFieldKey") 

and then to

type Article
  @key(fields: "fieldX fieldY fieldD newFieldKey") 

@

1 Like