Created
December 20, 2016 10:41
-
-
Save Thunderbird7/b1c24582adc104676061b4e9904ff9c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { AppRegistry } from 'react-native'; | |
import App from './App' | |
import ApolloClient, { createNetworkInterface } from 'apollo-client' | |
import { ApolloProvider } from 'react-apollo' | |
const networkInterface = createNetworkInterface({ | |
uri: 'http://graphql-swapi.parseapp.com' | |
}) | |
const client = new ApolloClient({ networkInterface }) | |
export default class Apollo extends Component { | |
render() { | |
return ( | |
<ApolloProvider client={client}> | |
<App/> | |
</ApolloProvider> | |
) | |
} | |
} | |
AppRegistry.registerComponent('Apollo', () => Apollo); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment