Skip to content

Commit

Permalink
remove cache tag
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jan 23, 2024
1 parent 7940354 commit b7521f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/gql/fetcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ export const getEntityFromPath = cache(async <T extends NodeUnion | TermUnion, >
entity?: T,
redirect?: RouteRedirect
}> => {
const cacheTag = path.replace(/^\//, '').replaceAll('/', ':');
const token = await getAccessToken(draftMode);
let entity: T | undefined;

let query: RouteQuery;
try {
query = await graphqlClient(token?.access_token, {next: {tags: [cacheTag]}}).Route({path});
query = await graphqlClient(token?.access_token).Route({path});
} catch (e) {
console.error(`Error fetching route data for '${path}'. ` + (e instanceof Error && e.message));
return {entity: undefined, redirect: undefined};
Expand Down

0 comments on commit b7521f1

Please sign in to comment.