Skip to content

Commit

Permalink
fix: disable apollo cache by default
Browse files Browse the repository at this point in the history
fix ACR-1373
  • Loading branch information
luizfelipelaviola committed Aug 6, 2024
1 parent 80b4418 commit 110f1aa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-falcons-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"accru-client": patch
---

disable apollo cache by default
11 changes: 11 additions & 0 deletions src/api/apolloClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,17 @@ export const createApolloClient = ({
return new ApolloClient({
link: ApolloLink.from([errorLink, scalarLink, authLink, httpLink]),
cache: new InMemoryCache(),
defaultOptions: {
watchQuery: {
fetchPolicy: 'no-cache',
},
query: {
fetchPolicy: 'no-cache',
},
mutate: {
fetchPolicy: 'no-cache',
},
},
});
};

Expand Down

0 comments on commit 110f1aa

Please sign in to comment.