
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
@datadog/mobile-react-native-apollo-client
Advanced tools
A client-side React Native module to interact with Apollo Client and Datadog
Monitor your GraphQL resources with Real User Monitoring (RUM) and perform the following:
RUM supports GraphQL requests created using @apollo/client.
Set up the RUM React Native SDK on your mobile React Native application. For more information, see RUM React Native Monitoring.
Add @apollo/client
to your application following the official installation documentation.
If you initialize your ApolloClient with the uri
parameter, initialize it with a HttpLink
:
import { ApolloClient, HttpLink } from '@apollo/client';
// before
const apolloClient = new ApolloClient({
uri: 'https://my.api.com/graphql'
});
// after
const apolloClient = new ApolloClient({
link: new HttpLink({ uri: 'https://my.api.com/graphql' })
});
Import DatadogLink
from @datadog/mobile-react-native-apollo-client
and use it in your ApolloClient initialization:
import { ApolloClient, from, HttpLink } from '@apollo/client';
import { DatadogLink } from '@datadog/mobile-react-native-apollo-client';
const apolloClient = new ApolloClient({
link: from([
new DatadogLink(),
new HttpLink({ uri: 'https://my.api.com/graphql' }) // always in last position
])
});
For more information on Apollo Client Links, refer to the official documentation.
Use a resourceEventMapper
in your Datadog configuration to remove sensitive data from GraphQL variables:
const datadogConfiguration = new DatadogProviderConfiguration(
'<CLIENT_TOKEN>',
'<ENVIRONMENT_NAME>',
'<RUM_APPLICATION_ID>',
true,
true,
true
);
datadogConfiguration.resourceEventMapper = event => {
// Variables are stored in event.context['_dd.graphql.variables'] as a JSON string when present
if (event.context['_dd.graphql.variables']) {
const variables = JSON.parse(event.context['_dd.graphql.variables']);
if (variables.password) {
variables.password = '***';
}
event.context['_dd.graphql.variables'] = JSON.stringify(variables);
}
return event;
};
FAQs
A client-side React Native module to interact with Apollo Client and Datadog
The npm package @datadog/mobile-react-native-apollo-client receives a total of 9,646 weekly downloads. As such, @datadog/mobile-react-native-apollo-client popularity was classified as popular.
We found that @datadog/mobile-react-native-apollo-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.