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

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',
},
}
});
}