aboutsummaryrefslogblamecommitdiffstats
path: root/webui/src/apollo.ts
blob: c111dbd8e0bef9b0079a9ed365cbce35b8373845 (plain) (tree)
1
2
3
4
5
6
7
8
                                                             
 
                                                  



                                 
                                                     





                                                                                           



                      
import { ApolloClient, InMemoryCache } from '@apollo/client';

import introspectionResult from './fragmentTypes';

const client = new ApolloClient({
  uri: '/graphql',
  cache: new InMemoryCache({
    possibleTypes: introspectionResult.possibleTypes,
    typePolicies: {
      // TODO: For now, we only query the default repository, so consider it as a singleton
      Repository: {
        keyFields: [],
      },
    },
  }),
});

export default client;