From 94771339d8cb346e58618a134303438ab67e402e Mon Sep 17 00:00:00 2001 From: Jonathan Nagayoshi Date: Thu, 25 Jan 2024 21:24:42 +0000 Subject: [PATCH] fix(catalog-backend-module-github): decreases number of teams fetched in graphql at a time Signed-off-by: Jonathan Nagayoshi --- .changeset/nice-carrots-dream.md | 5 +++++ plugins/catalog-backend-module-github/src/lib/github.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/nice-carrots-dream.md diff --git a/.changeset/nice-carrots-dream.md b/.changeset/nice-carrots-dream.md new file mode 100644 index 0000000000..3b57dfd9e0 --- /dev/null +++ b/.changeset/nice-carrots-dream.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-github': patch +--- + +Decreased number of teams fetched by GraphQL Query responsible for fetching Teams and Members in organization, due to timeouts when running against big organizations diff --git a/plugins/catalog-backend-module-github/src/lib/github.ts b/plugins/catalog-backend-module-github/src/lib/github.ts index cf6b400443..eff52ea98d 100644 --- a/plugins/catalog-backend-module-github/src/lib/github.ts +++ b/plugins/catalog-backend-module-github/src/lib/github.ts @@ -193,7 +193,7 @@ export async function getOrganizationTeams( const query = ` query teams($org: String!, $cursor: String) { organization(login: $org) { - teams(first: 100, after: $cursor) { + teams(first: 50, after: $cursor) { pageInfo { hasNextPage, endCursor } nodes { slug