add retrylink to apollo
This commit is contained in:
parent
968892b661
commit
59cfc7660b
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue