Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lenaten/react-native-relay
react-native and relay working out of the box
https://github.com/lenaten/react-native-relay
graphql react-native relay
Last synced: 3 months ago
JSON representation
react-native and relay working out of the box
- Host: GitHub
- URL: https://github.com/lenaten/react-native-relay
- Owner: lenaten
- Created: 2015-11-20T13:50:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-24T16:40:39.000Z (over 8 years ago)
- Last Synced: 2024-03-21T05:20:40.728Z (8 months ago)
- Topics: graphql, react-native, relay
- Language: JavaScript
- Homepage:
- Size: 16.4 MB
- Stars: 75
- Watchers: 5
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-relay - `react-native-relay` - Use Relay with React Native. (Libraries & Packages)
README
# NOTE
The problem was solved, please don't use this project anymore. Thanks.# react-native-relay
[![Join the chat at https://gitter.im/lenaten/react-native-relay](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/lenaten/react-native-relay?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
A working version of react-native with relay.
Fix the compatibility issue as described in https://github.com/facebook/relay/issues/26.
## Getting Started
### Run GraphQL Server
```
$ git clone https://github.com/relayjs/relay-starter-kit
$ cd relay-starter-kit
$ npm install
$ npm start
```### Run Native App
#### ios
```
$ git clone https://github.com/lenaten/react-native-relay.git
$ open react-native-relay/ios/fix.xcodeproj
```#### android
```
$ git clone https://github.com/lenaten/react-native-relay.git
$ cd react-native-relay
$ react-native run-android
```### Graphql URL Address
The default IP address of graphql server is localhost(127.0.0.1).
When you run the app on emulator like genymotion or on real device, localhost is not accessible. The graphqlURL config in `config.js` must be updated to accessible one.#### Genymotion
Find the network interface name in:
VirtualBox -> [Your Android VM] -> Settings -> Network -> Adapter Attached [0] To Host Only Adapter -> Name.
Find the IP address with `ifconfig` command, then replace the localhost string in config.js with the IP address.### babelRelayPlugin.js
The modified version of react-native explicitly looks for `babelRelayPlugin.js` in `/scripts`.## Modified Packages
- react-native
- version: 0.18.0 (self built)
- changes:
- https://github.com/facebook/react-native/pull/5084
- https://github.com/facebook/react-native/pull/5214
- relay
- version: 0.6.0 (self built)
- changes:
- https://github.com/facebook/relay/pull/713
- https://github.com/facebook/relay/pull/714
- fbjs
- version: 0.7.0 (self-built)
- changes:
- https://github.com/facebook/fbjs/pull/95## Thanks
- @skevy. You did the real work.
- @boourns