federation
federation copied to clipboard
Selective custom directive forwarding from subgraph to gateway
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.
is there any progress to share on this?