add retrylink to apollo

This commit is contained in:
keyan 2021-09-07 15:22:57 -05:00
parent 968892b661
commit 59cfc7660b
1 changed files with 8 additions and 1 deletions

View File

@ -1,8 +1,15 @@
import { ApolloClient, InMemoryCache } from '@apollo/client'
import { ApolloClient, InMemoryCache, from, HttpLink } from '@apollo/client'
import { isFirstPage } from './cursor'
import { RetryLink } from '@apollo/client/link/retry'
const additiveLink = from([
new RetryLink(),
new HttpLink({ uri: '/api/graphql' })
])
export default new ApolloClient({
uri: '/api/graphql',
link: additiveLink,
cache: new InMemoryCache({
typePolicies: {
Query: {