Skip to content

Commit 967ecbb

Browse files
authored
Sanne/perf remove unused gql fields (#8799)
* remove unused sandboxes field from TeamSidebarData query * remove unused likeCount field from sandbox fragment * do not use unfetched sandboxes * temp: log caught error * do not use unfetched sandboxes * do not use unfetched sandboxes * remove console log
1 parent f5d9afd commit 967ecbb

File tree

4 files changed

+0
-8
lines changed

4 files changed

+0
-8
lines changed

packages/app/src/app/overmind/effects/gql/dashboard/fragments.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export const sandboxFragmentDashboard = gql`
1515
screenshotUrl
1616
screenshotOutdated
1717
viewCount
18-
likeCount
1918
isV2
2019
draft
2120
restricted

packages/app/src/app/overmind/effects/gql/sidebar/queries.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,10 @@ export const getTeamSidebarData: Query<
2828
projects(syncData: false) {
2929
...sidebarProjectFragment
3030
}
31-
sandboxes(limit: 10, orderBy: { field: "updatedAt", direction: DESC }) {
32-
...sandboxFragmentDashboard
33-
}
3431
}
3532
}
3633
}
3734
${sidebarSyncedSandboxFragment}
3835
${sidebarTemplateFragment}
3936
${sidebarProjectFragment}
40-
${sandboxFragmentDashboard}
4137
`;

packages/app/src/app/overmind/namespaces/sidebar/actions.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export const getSidebarData = async (
1515
const result = await queries.getTeamSidebarData({ id: teamId });
1616

1717
const syncedSandboxes = result.me?.team?.syncedSandboxes || null;
18-
const sandboxes = result.me?.team?.sandboxes || [];
1918
const templates = result.me?.team?.templates || null;
2019
const repositories =
2120
result.me?.team?.projects?.map(p => ({
@@ -30,7 +29,6 @@ export const getSidebarData = async (
3029
state.sidebar[teamId] = {
3130
hasSyncedSandboxes,
3231
hasTemplates,
33-
sandboxes,
3432
repositories,
3533
};
3634
} catch {

packages/app/src/app/overmind/namespaces/sidebar/state.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ type SidebarState = {
55
hasSyncedSandboxes: boolean | null;
66
hasTemplates: boolean | null;
77
repositories: Array<RepoInfo>;
8-
sandboxes: Array<Sandbox>;
98
};
109

1110
export type State = Record<string, SidebarState>;

0 commit comments

Comments
 (0)