@apollo/composition@2.14.0
Minor Changes
-
Relax
@composeDirectivevalidation when definitions are absent in some subgraphs. (#3422)Previously, if some set of spec directives were being composed into the supergraph schema via
@composeDirective, then subgraphs with the latest version of that spec would each have to declare all of those spec directive definitions. Not following this rule would often result in composition emitting aDIRECTIVE_COMPOSITION_ERRORerror. This restriction has now been relaxed, and a definition needs to only be in at least one of those subgraphs with the latest version of that spec.As an example, the following
@composeDirectiveusage could previously fail, but is now valid.# subgraph A — composes and defines @foo and @bar extend schema # ... @link(url: "https://myorg.dev/myspec/v1.0", import: ["@foo", "@bar"]) @composeDirective(name: "@foo") @composeDirective(name: "@bar") # ... directive @foo on FIELD directive @bar on FIELD # subgraph B — composes and defines only @foo extend schema # ... @link(url: "https://myorg.dev/myspec/v1.0", import: ["@foo"]) @composeDirective(name: "@foo") # ... directive @foo on FIELD
Patch Changes
- Fixed print logic when calculating the max number of elements to include in the message. Previously we were not passing (#3424) the current calculated length correctly leading to inclusion of additional elements in the error/hints message.
- Updated dependencies [
21cf465d4c687daeed71635422718c3c7b7d2d0e,5b36fc6b5a494aa6983e0339713dc45a0bd031e3,a20279a0184d9dfbc01a806d849dc8ae22497298]:- @apollo/federation-internals@2.14.0
- @apollo/query-graphs@2.14.0
Fetched April 30, 2026
