Last active
December 11, 2017 21:10
-
-
Save r3-yamauchi/0d107e91938083703966ca1f58cc0dd8 to your computer and use it in GitHub Desktop.
kintone から GRAPHCOOL にアクセスする https://blog.r3it.com/kintone-to-graphcool-852f7c305a49
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 from 'react'; | |
import { ApolloClient } from 'apollo-client'; | |
import { HttpLink } from 'apollo-link-http'; | |
import { InMemoryCache } from 'apollo-cache-inmemory'; | |
import { ApolloProvider } from 'react-apollo'; | |
import ArticleList from './ArticleList'; | |
const link = new HttpLink({ | |
uri: 'https://api.graph.cool/simple/v1/xxxxxxxx99x9x99999xx99xxx', | |
}); | |
const cache = new InMemoryCache(); | |
const client = new ApolloClient({ link, cache }); | |
const App = () => ( | |
<ApolloProvider client={client}> | |
<div> | |
<h1>Graphcool からデータを取得する</h1> | |
<ArticleList /> | |
</div> | |
</ApolloProvider> | |
); | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment