Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions packages/app/src/app/graphql/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6263,6 +6263,29 @@ export type PathedSandboxesQuery = {
} | null;
};

export type RecentSandboxFragment = {
__typename?: 'Sandbox';
id: string;
alias: string | null;
title: string | null;
lastAccessedAt: any;
screenshotUrl: string | null;
privacy: number;
teamId: any | null;
source: { __typename?: 'Source'; template: string | null };
customTemplate: { __typename?: 'Template'; id: any | null } | null;
forkedTemplate: {
__typename?: 'Template';
id: any | null;
color: string | null;
} | null;
collection: {
__typename?: 'Collection';
path: string;
teamId: any | null;
} | null;
};

export type RecentSandboxesQueryVariables = Exact<{
orderField: Scalars['String'];
orderDirection: Direction;
Expand All @@ -6278,12 +6301,9 @@ export type RecentSandboxesQuery = {
id: string;
alias: string | null;
title: string | null;
description: string | null;
insertedAt: string;
updatedAt: string;
removedAt: string | null;
privacy: number;
lastAccessedAt: any;
screenshotUrl: string | null;
privacy: number;
teamId: any | null;
source: { __typename?: 'Source'; template: string | null };
customTemplate: { __typename?: 'Template'; id: any | null } | null;
Expand Down
35 changes: 33 additions & 2 deletions packages/app/src/app/pages/Dashboard/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,37 @@ export const PATHED_SANDBOXES_CONTENT_QUERY = gql`
${SIDEBAR_COLLECTION_FRAGMENT}
`;

const RECENT_SANDBOX_FRAGMENT = gql`
fragment RecentSandbox on Sandbox {
id
alias
title
lastAccessedAt
screenshotUrl
privacy

source {
template
}

customTemplate {
id
}

forkedTemplate {
id
color
}

collection {
path
teamId
}

teamId
}
`;

export const RECENT_SANDBOXES_CONTENT_QUERY = gql`
query RecentSandboxes($orderField: String!, $orderDirection: Direction!) {
me {
Expand All @@ -223,11 +254,11 @@ export const RECENT_SANDBOXES_CONTENT_QUERY = gql`
limit: 20
orderBy: { field: $orderField, direction: $orderDirection }
) {
...Sandbox
...RecentSandbox
}
}
}
${SANDBOX_FRAGMENT}
${RECENT_SANDBOX_FRAGMENT}
`;

export const SEARCH_SANDBOXES_QUERY = gql`
Expand Down
Loading