Skip to content

Commit aa99921

Browse files
authored
Revert "Sanne/perf remove unused gql fields (#8799)" (#8800)
This reverts commit 967ecbb.
1 parent 967ecbb commit aa99921

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const sandboxFragmentDashboard = gql`
1515
screenshotUrl
1616
screenshotOutdated
1717
viewCount
18+
likeCount
1819
isV2
1920
draft
2021
restricted

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ export const getTeamSidebarData: Query<
2828
projects(syncData: false) {
2929
...sidebarProjectFragment
3030
}
31+
sandboxes(limit: 10, orderBy: { field: "updatedAt", direction: DESC }) {
32+
...sandboxFragmentDashboard
33+
}
3134
}
3235
}
3336
}
3437
${sidebarSyncedSandboxFragment}
3538
${sidebarTemplateFragment}
3639
${sidebarProjectFragment}
40+
${sandboxFragmentDashboard}
3741
`;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ 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 || [];
1819
const templates = result.me?.team?.templates || null;
1920
const repositories =
2021
result.me?.team?.projects?.map(p => ({
@@ -29,6 +30,7 @@ export const getSidebarData = async (
2930
state.sidebar[teamId] = {
3031
hasSyncedSandboxes,
3132
hasTemplates,
33+
sandboxes,
3234
repositories,
3335
};
3436
} catch {

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

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

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

0 commit comments

Comments
 (0)