Join us from October 8-10 in New York City to learn the latest tips, trends, and news about GraphQL federation and API platform engineering.Join us for GraphQL Summit 2024 in NYC
Start for Free
You're viewing documentation for an upcoming version of this software. Switch to the latest stable version.

Client Awareness

users can opt-in Client Awareness. Client Awareness allows you to view metrics split per client, helping you understand how each one interacts with your .

Client Awareness uses apollographql-client-name and apollographql-client-version custom HTTP headers to report client usage.

Enable it by adding an ApolloClientAwarenessInterceptor to your ApolloClient:

val apolloClient = ApolloClient.Builder()
.addHttpInterceptor(ApolloClientAwarenessInterceptor(BuildConfig.APPLICATION_ID, BuildConfig.VERSION_NAME))


This example uses `BuildConfig` to set the app's `applicationId` as the client name and its `versionName` as the client version, but you can override this. Especially, if your iOS and Android apps use the same package name, it's useful to customize it to be able to differentiate the clients.
File types
Multi Modules
Rate articleRateEdit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy