federation icon indicating copy to clipboard operation
federation copied to clipboard

Selective custom directive forwarding from subgraph to gateway

Open wabrit opened this issue 3 years ago • 1 comments
trafficstars

The current Apollo v2 federation docs state:

Custom directives are not included in your graph’s composed supergraph schema. The composition process strips all subgraph directives. Only a given subgraph is aware of its own directives.

While this approach makes sense for a lot of directives, there are exceptions where directives capture metadata that should be under the control of the subgraph, but the actions taken on the basis of that metadata should be carried out by the gateway.

One example is the use of metadata to express query cost / complexity, where the checking of a received query for excessive complexity needs to be carried out at the gateway layer.

wabrit avatar Feb 16 '22 08:02 wabrit

is there any progress to share on this?

ayushs-2k4 avatar Sep 30 '24 21:09 ayushs-2k4