Skip to content

Instantly share code, notes, and snippets.

@r3-yamauchi
Last active December 11, 2017 21:10
Show Gist options
  • Save r3-yamauchi/0d107e91938083703966ca1f58cc0dd8 to your computer and use it in GitHub Desktop.
Save r3-yamauchi/0d107e91938083703966ca1f58cc0dd8 to your computer and use it in GitHub Desktop.
kintone から GRAPHCOOL にアクセスする https://blog.r3it.com/kintone-to-graphcool-852f7c305a49
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