-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Admin: default role management (#2721)
- Loading branch information
Showing
13 changed files
with
459 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
catalog/app/containers/Admin/Roles/gql/SetDefault.generated.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core' | ||
import * as Types from '../../../../model/graphql/types.generated' | ||
|
||
export type containers_Admin_Roles_gql_SetDefaultMutationVariables = Types.Exact<{ | ||
id: Types.Scalars['ID'] | ||
}> | ||
|
||
export type containers_Admin_Roles_gql_SetDefaultMutation = { | ||
readonly __typename: 'Mutation' | ||
} & { | ||
readonly roleSetDefault: | ||
| ({ readonly __typename: 'RoleSetDefaultSuccess' } & { | ||
readonly role: | ||
| ({ readonly __typename: 'UnmanagedRole' } & Pick<Types.UnmanagedRole, 'id'>) | ||
| ({ readonly __typename: 'ManagedRole' } & Pick<Types.ManagedRole, 'id'>) | ||
}) | ||
| { readonly __typename: 'RoleDoesNotExist' } | ||
} | ||
|
||
export const containers_Admin_Roles_gql_SetDefaultDocument = { | ||
kind: 'Document', | ||
definitions: [ | ||
{ | ||
kind: 'OperationDefinition', | ||
operation: 'mutation', | ||
name: { kind: 'Name', value: 'containers_Admin_Roles_gql_SetDefault' }, | ||
variableDefinitions: [ | ||
{ | ||
kind: 'VariableDefinition', | ||
variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, | ||
type: { | ||
kind: 'NonNullType', | ||
type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } }, | ||
}, | ||
}, | ||
], | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { kind: 'Name', value: 'roleSetDefault' }, | ||
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: '__typename' } }, | ||
{ | ||
kind: 'InlineFragment', | ||
typeCondition: { | ||
kind: 'NamedType', | ||
name: { kind: 'Name', value: 'RoleSetDefaultSuccess' }, | ||
}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { kind: 'Name', value: 'role' }, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { kind: 'Name', value: '__typename' }, | ||
}, | ||
{ | ||
kind: 'InlineFragment', | ||
typeCondition: { | ||
kind: 'NamedType', | ||
name: { kind: 'Name', value: 'UnmanagedRole' }, | ||
}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ kind: 'Field', name: { kind: 'Name', value: 'id' } }, | ||
], | ||
}, | ||
}, | ||
{ | ||
kind: 'InlineFragment', | ||
typeCondition: { | ||
kind: 'NamedType', | ||
name: { kind: 'Name', value: 'ManagedRole' }, | ||
}, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ kind: 'Field', name: { kind: 'Name', value: 'id' } }, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
} as unknown as DocumentNode< | ||
containers_Admin_Roles_gql_SetDefaultMutation, | ||
containers_Admin_Roles_gql_SetDefaultMutationVariables | ||
> | ||
|
||
export { containers_Admin_Roles_gql_SetDefaultDocument as default } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
mutation ($id: ID!) { | ||
roleSetDefault(id: $id) { | ||
__typename | ||
... on RoleSetDefaultSuccess { | ||
role { | ||
__typename | ||
... on UnmanagedRole { | ||
id | ||
} | ||
... on ManagedRole { | ||
id | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.