Utilisation de la stratégie de cache 'cache puis réseau'

This commit is contained in:
wpetit 2020-09-10 19:28:08 +02:00
parent 772b09381c
commit 11f54ab66e
1 changed files with 13 additions and 0 deletions

View File

@ -44,6 +44,19 @@ export function createClient(setLoggedIn: (boolean) => void) {
errorLink,
retryLink
]),
defaultOptions: {
watchQuery: {
fetchPolicy: 'cache-and-network',
errorPolicy: 'ignore',
},
query: {
fetchPolicy: 'network-only',
errorPolicy: 'all',
},
mutate: {
errorPolicy: 'all',
},
}
});
}