Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 96e951c

Browse files
authored
Replace fetch policy network-only -> no-cache (#357)
1 parent fc210f4 commit 96e951c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/pr-info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export async function queryPRInfo(prNumber: number) {
158158
const info = await client.query({
159159
query: GetPRInfo,
160160
variables: { pr_number: prNumber },
161-
fetchPolicy: "network-only",
161+
fetchPolicy: "no-cache",
162162
});
163163
const prInfo = info.data.repository?.pullRequest;
164164
if (!prInfo) return info; // let `deriveStateForPR` handle the missing result

src/queries/SHA1-to-PR-query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const runQueryToGetPRMetadataForSHA1 = async (owner: string, repo: string
66
const info = await client.query({
77
query: GetPRForSHA1Query,
88
variables: { query: `${sha1} type:pr repo:${owner}/${repo}` },
9-
fetchPolicy: "network-only",
9+
fetchPolicy: "no-cache",
1010
});
1111
const pr = info.data.search.nodes?.[0];
1212
return pr?.__typename === "PullRequest" ? pr : undefined;

src/queries/all-open-prs-query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function getAllOpenPRsAndCardIDs() {
2626
while (true) {
2727
const results = await client.query({
2828
query: getAllOpenPRsAndCardIDsQuery,
29-
fetchPolicy: "network-only",
29+
fetchPolicy: "no-cache",
3030
variables: { after }
3131
});
3232

src/queries/card-id-to-pr-query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const runQueryToGetPRForCardId = async (id: string): Promise<CardPRInfo |
1717
}
1818
}` as TypedDocumentNode<CardIdToPr, CardIdToPrVariables>,
1919
variables: { id },
20-
fetchPolicy: "network-only",
20+
fetchPolicy: "no-cache",
2121
});
2222
const node = info.data.node;
2323
return (node?.__typename === "ProjectCard" && node.content?.__typename === "PullRequest")

src/queries/projectboard-cards.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ interface ColumnInfo {
3838
export async function getProjectBoardCards() {
3939
const results = await client.query({
4040
query: GetProjectBoardCardsQuery,
41-
fetchPolicy: "network-only",
41+
fetchPolicy: "no-cache",
4242
});
4343

4444
const project = results.data.repository?.project;

0 commit comments

Comments
 (0)