Client awareness
Configure client awareness in Apollo Router
The Apollo Router supports client awareness by default. If the client sets the headers apollographql-client-name
and apollographql-client-version
in its HTTP requests, Apollo Studio can separate the metrics and queries 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:
router.yaml
telemetry:apollo:# defaults to apollographql-client-nameclient_name_header: MyClientHeaderName# defaults to apollographql-client-versionclient_version_header: MyClientHeaderVersioncors:# The headers to allow.# (Defaults to [ Content-Type ], which is required for Apollo Studio)allow_headers: [ Content-Type, MyClientHeaderName, MyClientHeaderVersion]