> ## Documentation Index
> Fetch the complete documentation index at: https://wundergraphinc-brendan-add-sof-link.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Forward Client Extensions

> Forward Client Extensions allow you to share arbitrary data between clients and subgraphs. For subscriptions, it is the only method for sharing init-session data.

## 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.

This feature allows you to extend GraphQL in a very flexible way as defined by the [GraphQL over HTTP specification](https://github.com/graphql/graphql-over-http/blob/main/spec/GraphQLOverHTTP.md#request-parameters).

Here's an example on how this can be used:

```json theme={null}
{"query":"{hello}","extensions":{"token":"asd"}}
```

### For initiating a subscription

Alternatively, this feature could be useful to send a token when initiating a subscription:

```json theme={null}
{"id":"1","type":"subscribe","payload":{"extensions":{"token":"asd"},"query":"subscription {\n  currentTime {\n    unixTime\n  }\n}"}}
```

More info on how this can be used with subscriptions can be found [here](/router/subscriptions#using-the-extensions-field).
