Skip to content

Commit

Permalink
test shorter page cache - apollo fetchPolicy='no-cache'
Browse files Browse the repository at this point in the history
  • Loading branch information
vnugent committed Apr 26, 2024
1 parent 3a720d5 commit 6e7255e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/js/graphql/ServerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export const { getClient } = registerApolloClient(() => {
return new ApolloClient({
cache: new InMemoryCache(),
link: new HttpLink({
uri,
fetchOptions: { cache: 'no-store' }
uri
})
})
})
2 changes: 1 addition & 1 deletion src/js/graphql/contribAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const getChangeHistoryServerSide = async (): Promise<ChangesetType[]> =>
try {
const rs = await getClient().query<{ getChangeHistory: ChangesetType[] }>({
query: QUERY_RECENT_CHANGE_HISTORY,
fetchPolicy: 'cache-first'
fetchPolicy: 'no-cache'
})

if (Array.isArray(rs.data?.getChangeHistory)) {
Expand Down

0 comments on commit 6e7255e

Please sign in to comment.