From 898e285bcfaf5e4c9f9797c4762b6c1b193cb214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Berg=C3=A9?= Date: Wed, 6 Nov 2024 09:03:58 +0200 Subject: [PATCH] fix(sso): allow to enable GitHub SSO on GitHub light installation --- .../containers/Team/GitHubSSO/Configure.tsx | 41 +++++++++++++++---- apps/frontend/src/gql/gql.ts | 4 +- apps/frontend/src/gql/graphql.ts | 11 +++-- 3 files changed, 44 insertions(+), 12 deletions(-) diff --git a/apps/frontend/src/containers/Team/GitHubSSO/Configure.tsx b/apps/frontend/src/containers/Team/GitHubSSO/Configure.tsx index d2895e15c..218e1940c 100644 --- a/apps/frontend/src/containers/Team/GitHubSSO/Configure.tsx +++ b/apps/frontend/src/containers/Team/GitHubSSO/Configure.tsx @@ -31,7 +31,19 @@ import { Modal } from "@/ui/Modal"; import { Tooltip } from "@/ui/Tooltip"; const query = graphql(` - query ConfigureGitHubSSO_installations { + query ConfigureGitHubSSO_installations($teamAccountId: ID!) { + teamAccount: accountById(id: $teamAccountId) { + id + ... on Team { + githubLightInstallation { + id + ghInstallation { + id + ...GithubInstallationsSelect_GhApiInstallation + } + } + } + } me { id ghInstallations { @@ -51,8 +63,13 @@ const query = graphql(` } `); -function GitHubInstallationsSelectControl() { - const { data } = useQuery(query); +function GitHubInstallationsSelectControl(props: { teamAccountId: string }) { + const { data, error } = useQuery(query, { + variables: { teamAccountId: props.teamAccountId }, + }); + if (error) { + throw error; + } const installations = (() => { if (!data) { return []; @@ -60,6 +77,15 @@ function GitHubInstallationsSelectControl() { invariant(data.me, "Expected me"); return data.me.ghInstallations.edges; })(); + + const installationType = (() => { + if (!data) { + return null; + } + invariant(installations, "Expected installations"); + invariant(data.teamAccount?.__typename === "Team", "Expected teamAccount"); + return data.teamAccount.githubLightInstallation ? "light" : "main"; + })(); const form = useFormContext(); const controller = useController({ name: "ghInstallationId", @@ -90,9 +116,8 @@ function GitHubInstallationsSelectControl() { invariant(installation, "Expected installation"); controller.field.onChange(installation.id); }} - // Could be wrong if the user use GitHub light - // @TODO use the correct app here - app="main" + disabled={!data} + app={installationType ?? "main"} /> {controller.fieldState.error?.message && ( @@ -157,7 +182,9 @@ function ActiveConfigureSSOForm(props: { from your GitHub organization will be automatically added to your Argos Team. You will be able to configure role for each Team member. - + {props.priced ? ( <>
diff --git a/apps/frontend/src/gql/gql.ts b/apps/frontend/src/gql/gql.ts index be74e3622..0b9f08455 100644 --- a/apps/frontend/src/gql/gql.ts +++ b/apps/frontend/src/gql/gql.ts @@ -82,7 +82,7 @@ const documents = { "\n fragment TeamGitHubLight_Team on Team {\n id\n githubLightInstallation {\n id\n ghAccount {\n id\n login\n name\n url\n }\n }\n }\n": types.TeamGitHubLight_TeamFragmentDoc, "\n fragment TeamGitHubSSO_Team on Team {\n id\n plan {\n id\n displayName\n usageBased\n githubSsoIncluded\n }\n subscriptionStatus\n ssoGithubAccount {\n id\n ...GithubAccountLink_GithubAccount\n }\n }\n": types.TeamGitHubSso_TeamFragmentDoc, "\n mutation ConfigureGitHubSSO_disableGitHubSSOOnTeam($teamAccountId: ID!) {\n disableGitHubSSOOnTeam(input: { teamAccountId: $teamAccountId }) {\n ...TeamGitHubSSO_Team\n }\n }\n": types.ConfigureGitHubSso_DisableGitHubSsoOnTeamDocument, - "\n query ConfigureGitHubSSO_installations {\n me {\n id\n ghInstallations {\n edges {\n id\n account {\n id\n login\n }\n ...GithubInstallationsSelect_GhApiInstallation\n }\n pageInfo {\n totalCount\n }\n }\n }\n }\n": types.ConfigureGitHubSso_InstallationsDocument, + "\n query ConfigureGitHubSSO_installations($teamAccountId: ID!) {\n teamAccount: accountById(id: $teamAccountId) {\n id\n ... on Team {\n githubLightInstallation {\n id\n ghInstallation {\n id\n ...GithubInstallationsSelect_GhApiInstallation\n }\n }\n }\n }\n me {\n id\n ghInstallations {\n edges {\n id\n account {\n id\n login\n }\n ...GithubInstallationsSelect_GhApiInstallation\n }\n pageInfo {\n totalCount\n }\n }\n }\n }\n": types.ConfigureGitHubSso_InstallationsDocument, "\n mutation ConfigureGitHubSSO_enableGitHubSSOOnTeam(\n $teamAccountId: ID!\n $ghInstallationId: Int!\n ) {\n enableGitHubSSOOnTeam(\n input: {\n teamAccountId: $teamAccountId\n ghInstallationId: $ghInstallationId\n }\n ) {\n ...TeamGitHubSSO_Team\n }\n }\n": types.ConfigureGitHubSso_EnableGitHubSsoOnTeamDocument, "\n query TeamMembers_teamMembers($id: ID!, $first: Int!, $after: Int!) {\n team: teamById(id: $id) {\n id\n members(first: $first, after: $after, sso: false) {\n edges {\n id\n level\n user {\n id\n ...UserListRow_user\n ...RemoveFromTeamDialog_User\n }\n ...LevelSelect_TeamMember\n }\n pageInfo {\n hasNextPage\n totalCount\n }\n }\n }\n }\n": types.TeamMembers_TeamMembersDocument, "\n query TeamMembers_githubMembers($id: ID!, $first: Int!, $after: Int!) {\n team: teamById(id: $id) {\n id\n githubMembers(first: $first, after: $after) {\n edges {\n id\n githubAccount {\n id\n login\n avatar {\n ...AccountAvatarFragment\n }\n }\n teamMember {\n id\n level\n user {\n id\n name\n slug\n avatar {\n ...AccountAvatarFragment\n }\n ...RemoveFromTeamDialog_User\n }\n ...LevelSelect_TeamMember\n }\n }\n pageInfo {\n hasNextPage\n }\n }\n }\n }\n": types.TeamMembers_GithubMembersDocument, @@ -421,7 +421,7 @@ export function graphql(source: "\n mutation ConfigureGitHubSSO_disableGitHubSS /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n query ConfigureGitHubSSO_installations {\n me {\n id\n ghInstallations {\n edges {\n id\n account {\n id\n login\n }\n ...GithubInstallationsSelect_GhApiInstallation\n }\n pageInfo {\n totalCount\n }\n }\n }\n }\n"): (typeof documents)["\n query ConfigureGitHubSSO_installations {\n me {\n id\n ghInstallations {\n edges {\n id\n account {\n id\n login\n }\n ...GithubInstallationsSelect_GhApiInstallation\n }\n pageInfo {\n totalCount\n }\n }\n }\n }\n"]; +export function graphql(source: "\n query ConfigureGitHubSSO_installations($teamAccountId: ID!) {\n teamAccount: accountById(id: $teamAccountId) {\n id\n ... on Team {\n githubLightInstallation {\n id\n ghInstallation {\n id\n ...GithubInstallationsSelect_GhApiInstallation\n }\n }\n }\n }\n me {\n id\n ghInstallations {\n edges {\n id\n account {\n id\n login\n }\n ...GithubInstallationsSelect_GhApiInstallation\n }\n pageInfo {\n totalCount\n }\n }\n }\n }\n"): (typeof documents)["\n query ConfigureGitHubSSO_installations($teamAccountId: ID!) {\n teamAccount: accountById(id: $teamAccountId) {\n id\n ... on Team {\n githubLightInstallation {\n id\n ghInstallation {\n id\n ...GithubInstallationsSelect_GhApiInstallation\n }\n }\n }\n }\n me {\n id\n ghInstallations {\n edges {\n id\n account {\n id\n login\n }\n ...GithubInstallationsSelect_GhApiInstallation\n }\n pageInfo {\n totalCount\n }\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/apps/frontend/src/gql/graphql.ts b/apps/frontend/src/gql/graphql.ts index b5eb1ce7f..5eb09d38c 100644 --- a/apps/frontend/src/gql/graphql.ts +++ b/apps/frontend/src/gql/graphql.ts @@ -1662,10 +1662,15 @@ export type ConfigureGitHubSso_DisableGitHubSsoOnTeamMutation = { __typename?: ' & { ' $fragmentRefs'?: { 'TeamGitHubSso_TeamFragment': TeamGitHubSso_TeamFragment } } ) }; -export type ConfigureGitHubSso_InstallationsQueryVariables = Exact<{ [key: string]: never; }>; +export type ConfigureGitHubSso_InstallationsQueryVariables = Exact<{ + teamAccountId: Scalars['ID']['input']; +}>; -export type ConfigureGitHubSso_InstallationsQuery = { __typename?: 'Query', me?: { __typename?: 'User', id: string, ghInstallations: { __typename?: 'GhApiInstallationConnection', edges: Array<( +export type ConfigureGitHubSso_InstallationsQuery = { __typename?: 'Query', teamAccount?: { __typename?: 'Team', id: string, githubLightInstallation?: { __typename?: 'GithubInstallation', id: string, ghInstallation?: ( + { __typename?: 'GhApiInstallation', id: string } + & { ' $fragmentRefs'?: { 'GithubInstallationsSelect_GhApiInstallationFragment': GithubInstallationsSelect_GhApiInstallationFragment } } + ) | null } | null } | { __typename?: 'User', id: string } | null, me?: { __typename?: 'User', id: string, ghInstallations: { __typename?: 'GhApiInstallationConnection', edges: Array<( { __typename?: 'GhApiInstallation', id: string, account: { __typename?: 'GhApiInstallationAccount', id: string, login: string } } & { ' $fragmentRefs'?: { 'GithubInstallationsSelect_GhApiInstallationFragment': GithubInstallationsSelect_GhApiInstallationFragment } } )>, pageInfo: { __typename?: 'PageInfo', totalCount: number } } } | null }; @@ -2136,7 +2141,7 @@ export const ProjectVisibility_UpdateProjectDocument = {"kind":"Document","defin export const TeamAccessUserLevel_SetTeamDefaultUserLevelDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"TeamAccessUserLevel_setTeamDefaultUserLevel"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamAccountId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"level"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"TeamDefaultUserLevel"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setTeamDefaultUserLevel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"teamAccountId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamAccountId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"level"},"value":{"kind":"Variable","name":{"kind":"Name","value":"level"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamAccessRole_Team"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamAccessRole_Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Team"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"defaultUserLevel"}}]}}]} as unknown as DocumentNode; export const DeleteTeamMutationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteTeamMutation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamAccountId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteTeam"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"accountId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamAccountId"}}}]}}]}]}}]} as unknown as DocumentNode; export const ConfigureGitHubSso_DisableGitHubSsoOnTeamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ConfigureGitHubSSO_disableGitHubSSOOnTeam"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamAccountId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"disableGitHubSSOOnTeam"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"teamAccountId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamAccountId"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamGitHubSSO_Team"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GithubAccountLink_GithubAccount"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GithubAccount"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"login"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamGitHubSSO_Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Team"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"usageBased"}},{"kind":"Field","name":{"kind":"Name","value":"githubSsoIncluded"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscriptionStatus"}},{"kind":"Field","name":{"kind":"Name","value":"ssoGithubAccount"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"GithubAccountLink_GithubAccount"}}]}}]}}]} as unknown as DocumentNode; -export const ConfigureGitHubSso_InstallationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ConfigureGitHubSSO_installations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"me"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ghInstallations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"account"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"login"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"GithubInstallationsSelect_GhApiInstallation"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GithubInstallationsSelect_GhApiInstallation"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GhApiInstallation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"account"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"login"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; +export const ConfigureGitHubSso_InstallationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ConfigureGitHubSSO_installations"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamAccountId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"teamAccount"},"name":{"kind":"Name","value":"accountById"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamAccountId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Team"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"githubLightInstallation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ghInstallation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"GithubInstallationsSelect_GhApiInstallation"}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"me"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"ghInstallations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"account"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"login"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"GithubInstallationsSelect_GhApiInstallation"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GithubInstallationsSelect_GhApiInstallation"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GhApiInstallation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"account"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"login"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; export const ConfigureGitHubSso_EnableGitHubSsoOnTeamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ConfigureGitHubSSO_enableGitHubSSOOnTeam"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamAccountId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ghInstallationId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"enableGitHubSSOOnTeam"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"teamAccountId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamAccountId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"ghInstallationId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ghInstallationId"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamGitHubSSO_Team"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GithubAccountLink_GithubAccount"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GithubAccount"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"login"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamGitHubSSO_Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Team"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"usageBased"}},{"kind":"Field","name":{"kind":"Name","value":"githubSsoIncluded"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscriptionStatus"}},{"kind":"Field","name":{"kind":"Name","value":"ssoGithubAccount"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"GithubAccountLink_GithubAccount"}}]}}]}}]} as unknown as DocumentNode; export const TeamMembers_TeamMembersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"TeamMembers_teamMembers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"team"},"name":{"kind":"Name","value":"teamById"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"members"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}},{"kind":"Argument","name":{"kind":"Name","value":"sso"},"value":{"kind":"BooleanValue","value":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"level"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UserListRow_user"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"RemoveFromTeamDialog_User"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LevelSelect_TeamMember"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AccountAvatarFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AccountAvatar"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"size"},"value":{"kind":"IntValue","value":"64"}}]},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"initial"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UserListRow_user"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AccountAvatarFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RemoveFromTeamDialog_User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UserListRow_user"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LevelSelect_TeamMember"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"level"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; export const TeamMembers_GithubMembersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"TeamMembers_githubMembers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"team"},"name":{"kind":"Name","value":"teamById"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"githubMembers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"githubAccount"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"login"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AccountAvatarFragment"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamMember"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"level"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AccountAvatarFragment"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"RemoveFromTeamDialog_User"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LevelSelect_TeamMember"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AccountAvatarFragment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AccountAvatar"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"size"},"value":{"kind":"IntValue","value":"64"}}]},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"initial"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UserListRow_user"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AccountAvatarFragment"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RemoveFromTeamDialog_User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UserListRow_user"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LevelSelect_TeamMember"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamMember"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"level"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode;