https://github.com/mohit23x/react-native-apollo-devtools
https://github.com/mohit23x/react-native-apollo-devtools
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mohit23x/react-native-apollo-devtools
- Owner: mohit23x
- Created: 2022-02-14T10:12:43.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-03T04:12:03.000Z (over 3 years ago)
- Last Synced: 2025-02-05T10:49:50.084Z (12 months ago)
- Language: TypeScript
- Size: 552 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## React Native Apollo Devtools
### Installation
#### Setting up mobile app
1. Add this in the package.json of the react-native app as devDependencies
```
"react-native-apollo-devtools": "https://github.com/mohit23x/react-native-apollo-devtools.git#4efe5b63ef5911b66fed6144259b94292cdd6d2b",
"react-native-flipper": "^0.131.1",
```
2. In the root file for example `index.ts` , add these lines, here the `client` is our apollo client exported from `apolloConfig.native.ts` file
```
import { apolloDevToolsInit } from 'react-native-apollo-devtools/packages/react-native-apollo-devtools-client';
if(__DEV__){
apolloDevToolsInit(client, {});
}
```
#### Setting up Flipper Plugin
> NOTE: These steps are temporary workaround until we move this repo to org and publish this plugin
1. Install Flipper in your system, and make sure the emulator/device is recognized by flipper by setting up proper SDK path
2. Go to `plugins manager` -> `install plugin` -> `import plugin` download [this plugin bundle](https://github.com/mohit23x/react-native-apollo-devtools/raw/master/packages/flipper-plugin-react-native-apollo-devtools/flipper-plugin-react-native-apollo-devtools-v1.0.0.tgz) and import it
3. Click `install` and restart Flipper

4. Launch the mobile app and you should see `Apollo Devtools` in the list of plugin in disable section, Click `+` icon to enable it 🎉
