Add custom directives to all subgraphs with Rover CLI supergraph compose

We’re looking at adding some new directives to our federated graph. We don’t want to duplicate these directives in every subgraph schema file, but source them from a single directives.graphql file.

We’re using rover cli with a supergraph --config yaml which currently errors because a schema is using one of these directives and rover doesn’t know about them. How can we ensure that our supergraph.graphql contains the custom directives?

On the subgraph servers we can merge the directives with the main typedefs, but building the supergraph still fails.

1 Like

Hey @matt-halliday. Did you end up finding a solution for this?