The problem was solved, please don't use this project anymore. Thanks.
A working version of react-native with relay.
Fix the compatibility issue as described in facebook/relay#26.
$ git clone https://github.com/relayjs/relay-starter-kit
$ cd relay-starter-kit
$ npm install
$ npm start
$ git clone https://github.com/lenaten/react-native-relay.git
$ open react-native-relay/ios/fix.xcodeproj
$ git clone https://github.com/lenaten/react-native-relay.git
$ cd react-native-relay
$ react-native run-android
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.
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.
The modified version of react-native explicitly looks for babelRelayPlugin.js
in <projectRoot>/scripts
.
- react-native
- version: 0.18.0 (self built)
- changes:
- relay
- version: 0.6.0 (self built)
- changes:
- fbjs
- version: 0.7.0 (self-built)
- changes:
- @skevy. You did the real work.
- @boourns