Skip to content

Commit 6ad6c5a

Browse files
refactor: add me.id to queries and rename recent queries for future refactor (#8828)
1 parent 8e8f2b9 commit 6ad6c5a

File tree

8 files changed

+112
-14
lines changed

8 files changed

+112
-14
lines changed

packages/app/src/app/components/Create/utils/queries.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ const TEMPLATE_FRAGMENT = gql`
3535
export const FETCH_TEAM_TEMPLATES = gql`
3636
query RecentAndWorkspaceTemplates($teamId: UUID4) {
3737
me {
38+
id
39+
3840
recentlyUsedTemplates(teamId: $teamId) {
3941
...Template
4042
}
@@ -86,6 +88,8 @@ const ORGANIZATION_FRAGMENT = gql`
8688
export const GET_GITHUB_ACCOUNTS = gql`
8789
query GetGithubAccounts {
8890
me {
91+
id
92+
8993
githubProfile {
9094
...Profile
9195
}

packages/app/src/app/graphql/types.ts

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3234,6 +3234,7 @@ export type RecentAndWorkspaceTemplatesQuery = {
32343234
__typename?: 'RootQueryType';
32353235
me: {
32363236
__typename?: 'CurrentUser';
3237+
id: any;
32373238
recentlyUsedTemplates: Array<{
32383239
__typename?: 'Template';
32393240
id: any | null;
@@ -3327,6 +3328,7 @@ export type GetGithubAccountsQuery = {
33273328
__typename?: 'RootQueryType';
33283329
me: {
33293330
__typename?: 'CurrentUser';
3331+
id: any;
33303332
githubProfile: {
33313333
__typename?: 'GithubProfile';
33323334
id: string;
@@ -4642,6 +4644,7 @@ export type RecentlyDeletedTeamSandboxesQuery = {
46424644
__typename?: 'RootQueryType';
46434645
me: {
46444646
__typename?: 'CurrentUser';
4647+
id: any;
46454648
team: {
46464649
__typename?: 'Team';
46474650
sandboxes: Array<{
@@ -4701,6 +4704,7 @@ export type SandboxesByPathQuery = {
47014704
__typename?: 'RootQueryType';
47024705
me: {
47034706
__typename?: 'CurrentUser';
4707+
id: any;
47044708
collections: Array<{
47054709
__typename?: 'Collection';
47064710
id: any | null;
@@ -4768,6 +4772,7 @@ export type TeamDraftsQuery = {
47684772
__typename?: 'RootQueryType';
47694773
me: {
47704774
__typename?: 'CurrentUser';
4775+
id: any;
47714776
team: {
47724777
__typename?: 'Team';
47734778
drafts: Array<{
@@ -4826,6 +4831,7 @@ export type AllCollectionsQuery = {
48264831
__typename?: 'RootQueryType';
48274832
me: {
48284833
__typename?: 'CurrentUser';
4834+
id: any;
48294835
collections: Array<{
48304836
__typename?: 'Collection';
48314837
id: any | null;
@@ -4843,6 +4849,7 @@ export type GetTeamReposQuery = {
48434849
__typename?: 'RootQueryType';
48444850
me: {
48454851
__typename?: 'CurrentUser';
4852+
id: any;
48464853
team: {
48474854
__typename?: 'Team';
48484855
sandboxes: Array<{
@@ -4918,6 +4925,7 @@ export type TeamTemplatesQuery = {
49184925
__typename?: 'RootQueryType';
49194926
me: {
49204927
__typename?: 'CurrentUser';
4928+
id: any;
49214929
team: {
49224930
__typename?: 'Team';
49234931
id: any;
@@ -4993,6 +5001,7 @@ export type AllTeamsQuery = {
49935001
__typename?: 'RootQueryType';
49945002
me: {
49955003
__typename?: 'CurrentUser';
5004+
id: any;
49965005
primaryWorkspaceId: any | null;
49975006
workspaces: Array<{
49985007
__typename?: 'Team';
@@ -5059,6 +5068,7 @@ export type _SearchTeamSandboxesQuery = {
50595068
__typename?: 'RootQueryType';
50605069
me: {
50615070
__typename?: 'CurrentUser';
5071+
id: any;
50625072
team: {
50635073
__typename?: 'Team';
50645074
sandboxes: Array<{
@@ -5109,15 +5119,16 @@ export type _SearchTeamSandboxesQuery = {
51095119
} | null;
51105120
};
51115121

5112-
export type RecentlyAccessedSandboxesQueryVariables = Exact<{
5122+
export type RecentlyAccessedSandboxesLegacyQueryVariables = Exact<{
51135123
limit: Scalars['Int'];
51145124
teamId: InputMaybe<Scalars['UUID4']>;
51155125
}>;
51165126

5117-
export type RecentlyAccessedSandboxesQuery = {
5127+
export type RecentlyAccessedSandboxesLegacyQuery = {
51185128
__typename?: 'RootQueryType';
51195129
me: {
51205130
__typename?: 'CurrentUser';
5131+
id: any;
51215132
recentlyAccessedSandboxes: Array<{
51225133
__typename?: 'Sandbox';
51235134
id: string;
@@ -5165,15 +5176,16 @@ export type RecentlyAccessedSandboxesQuery = {
51655176
} | null;
51665177
};
51675178

5168-
export type RecentlyAccessedBranchesQueryVariables = Exact<{
5179+
export type RecentlyAccessedBranchesLegacyQueryVariables = Exact<{
51695180
limit: Scalars['Int'];
51705181
teamId: InputMaybe<Scalars['UUID4']>;
51715182
}>;
51725183

5173-
export type RecentlyAccessedBranchesQuery = {
5184+
export type RecentlyAccessedBranchesLegacyQuery = {
51745185
__typename?: 'RootQueryType';
51755186
me: {
51765187
__typename?: 'CurrentUser';
5188+
id: any;
51775189
recentBranches: Array<{
51785190
__typename?: 'Branch';
51795191
id: string;
@@ -5205,6 +5217,7 @@ export type SharedWithMeSandboxesQuery = {
52055217
__typename?: 'RootQueryType';
52065218
me: {
52075219
__typename?: 'CurrentUser';
5220+
id: any;
52085221
collaboratorSandboxes: Array<{
52095222
__typename?: 'Sandbox';
52105223
id: string;
@@ -5260,6 +5273,7 @@ export type GetTeamQuery = {
52605273
__typename?: 'RootQueryType';
52615274
me: {
52625275
__typename?: 'CurrentUser';
5276+
id: any;
52635277
team: {
52645278
__typename?: 'Team';
52655279
id: any;
@@ -5383,6 +5397,7 @@ export type ContributionBranchesQuery = {
53835397
__typename?: 'RootQueryType';
53845398
me: {
53855399
__typename?: 'CurrentUser';
5400+
id: any;
53865401
recentBranches: Array<{
53875402
__typename?: 'Branch';
53885403
id: string;
@@ -5415,6 +5430,7 @@ export type RepositoriesByTeamQuery = {
54155430
__typename?: 'RootQueryType';
54165431
me: {
54175432
__typename?: 'CurrentUser';
5433+
id: any;
54185434
team: {
54195435
__typename?: 'Team';
54205436
id: any;
@@ -5625,6 +5641,7 @@ export type GetEligibleWorkspacesQuery = {
56255641
__typename?: 'RootQueryType';
56265642
me: {
56275643
__typename?: 'CurrentUser';
5644+
id: any;
56285645
eligibleWorkspaces: Array<{
56295646
__typename?: 'TeamPreview';
56305647
id: any;
@@ -5722,6 +5739,7 @@ export type EmailPreferencesQuery = {
57225739
__typename?: 'RootQueryType';
57235740
me: {
57245741
__typename?: 'CurrentUser';
5742+
id: any;
57255743
notificationPreferences: {
57265744
__typename?: 'NotificationPreferences';
57275745
emailCommentMention: boolean;
@@ -5746,6 +5764,7 @@ export type RecentNotificationsQuery = {
57465764
__typename?: 'RootQueryType';
57475765
me: {
57485766
__typename?: 'CurrentUser';
5767+
id: any;
57495768
notifications: Array<{
57505769
__typename?: 'Notification';
57515770
id: any;
@@ -5785,6 +5804,7 @@ export type TeamSidebarDataQuery = {
57855804
__typename?: 'RootQueryType';
57865805
me: {
57875806
__typename?: 'CurrentUser';
5807+
id: any;
57885808
team: {
57895809
__typename?: 'Team';
57905810
syncedSandboxes: Array<{ __typename?: 'Sandbox'; id: string }>;
@@ -5852,6 +5872,7 @@ export type TeamsQuery = {
58525872
__typename?: 'RootQueryType';
58535873
me: {
58545874
__typename?: 'CurrentUser';
5875+
id: any;
58555876
workspaces: Array<{ __typename?: 'Team'; id: any; name: string }>;
58565877
} | null;
58575878
};
@@ -5916,6 +5937,7 @@ export type TeamsSidebarQuery = {
59165937
__typename?: 'RootQueryType';
59175938
me: {
59185939
__typename?: 'CurrentUser';
5940+
id: any;
59195941
teams: Array<{ __typename?: 'Team'; id: any; name: string }>;
59205942
} | null;
59215943
};
@@ -5928,6 +5950,7 @@ export type PathedSandboxesFoldersQuery = {
59285950
__typename?: 'RootQueryType';
59295951
me: {
59305952
__typename?: 'CurrentUser';
5953+
id: any;
59315954
collections: Array<{
59325955
__typename?: 'Collection';
59335956
id: any | null;
@@ -6130,6 +6153,7 @@ export type PathedSandboxesQuery = {
61306153
__typename?: 'RootQueryType';
61316154
me: {
61326155
__typename?: 'CurrentUser';
6156+
id: any;
61336157
collections: Array<{
61346158
__typename?: 'Collection';
61356159
id: any | null;
@@ -6177,6 +6201,7 @@ export type RecentSandboxesQuery = {
61776201
__typename?: 'RootQueryType';
61786202
me: {
61796203
__typename?: 'CurrentUser';
6204+
id: any;
61806205
sandboxes: Array<{
61816206
__typename?: 'Sandbox';
61826207
id: string;
@@ -6211,6 +6236,7 @@ export type SearchSandboxesQuery = {
62116236
__typename?: 'RootQueryType';
62126237
me: {
62136238
__typename?: 'CurrentUser';
6239+
id: any;
62146240
sandboxes: Array<{
62156241
__typename?: 'Sandbox';
62166242
id: string;
@@ -6245,6 +6271,7 @@ export type DeletedSandboxesQuery = {
62456271
__typename?: 'RootQueryType';
62466272
me: {
62476273
__typename?: 'CurrentUser';
6274+
id: any;
62486275
sandboxes: Array<{
62496276
__typename?: 'Sandbox';
62506277
id: string;
@@ -6281,6 +6308,7 @@ export type TeamQuery = {
62816308
__typename?: 'RootQueryType';
62826309
me: {
62836310
__typename?: 'CurrentUser';
6311+
id: any;
62846312
team: {
62856313
__typename?: 'Team';
62866314
id: any;

0 commit comments

Comments
 (0)