Support for the “extensions” field in GraphQL Request JSON Payloads
For Query and Mutation
Cosmo Router supports sending the “extensions” field to Subgraphs. If a client sends an “extensions” field alongside a Query or Mutation, or alternatively as part of the “payload” of a Subscription Request, Cosmo Router will by default include the “extensions” field in all Subgraph requests. For an incremental@defer query, the same request extensions are forwarded to both the primary subgraph requests and subgraph requests started by deferred loaders.
This feature allows you to extend GraphQL in a very flexible way as defined by the GraphQL over HTTP specification.
Here’s an example on how this can be used: