Flipper plugin to visualise apollo client cache, queries and mutations for React Native.
This plugin offers feature parity with the official devtool for React Native since the official apollo client devtool only supports web platform and does not supports React Native.
Read more about it in our blog post here.
Devtools in action with the Ricky and Morty GraphQL API based react native sample app
- Install dependecies
yarn add -D react-native-apollo-devtools-client
yarn add -D react-native-flipper
- Initialize the plugin with apollo client
import { apolloDevToolsInit } from 'react-native-apollo-devtools-client';
const client = new ApolloClient({
// ...
})
if(__DEV__){
apolloDevToolsInit(client);
}
-
Install Flipper in your machine, and make sure the emulator/device is recognized by flipper by setting up proper SDK path in flipper settings.
-
Go to
plugins manager
->install plugin
-> searchreact-native-apollo
and install the plugin namedreact-native-apollo-devtools
-
Restart Flipper
-
Launch the mobile app and you should see
Apollo Devtools
in the list of plugin in disable section, Click+
icon to enable it 🎉
Licensed under the MIT License.
Link to our Code of Conduct