apollo.ts
1import ApolloClient from 'apollo-boost';
2import {
3 IntrospectionFragmentMatcher,
4 InMemoryCache,
5} from 'apollo-cache-inmemory';
6
7import introspectionQueryResultData from './fragmentTypes';
8
9const client = new ApolloClient({
10 uri: '/graphql',
11 cache: new InMemoryCache({
12 fragmentMatcher: new IntrospectionFragmentMatcher({
13 introspectionQueryResultData,
14 }),
15 }),
16});
17
18export default client;