Client Awareness

Configure client awareness in the router


The GraphOS Router and Apollo Router Core support client awareness by default. If the client sets the headers apollographql-client-name and apollographql-client-version in its HTTP requests, GraphOS Studio can separate the metrics and operations per client.

Overriding client awareness headers

Different header names can be used by updating the configuration file. If those headers will be sent by a browser, they must be allowed in the CORS (Cross Origin Resource Sharing) configuration , as follows:

YAML
router.yaml
1telemetry:
2  apollo:
3    # defaults to apollographql-client-name
4    client_name_header: MyClientHeaderName
5    # defaults to apollographql-client-version
6    client_version_header: MyClientHeaderVersion
7cors:
8  # The headers to allow.
9  # (Defaults to [ Content-Type ], which is required for GraphOS Studio)
10  allow_headers: [ Content-Type, MyClientHeaderName, MyClientHeaderVersion]