Skip to content

Commit

Permalink
Merge pull request #329 from kloudlite/ref/cli-queries-updated
Browse files Browse the repository at this point in the history
queries added for env status update
  • Loading branch information
abdheshnayak authored Nov 12, 2024
2 parents ac4f2be + 91b48b0 commit 9f632de
Show file tree
Hide file tree
Showing 4 changed files with 2,410 additions and 3,156 deletions.
24 changes: 24 additions & 0 deletions gql-queries-generator/doc/queries.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4725,17 +4725,25 @@ query authCli_getEnvironment($name: String!) {
RawMessage
}
}
isArchived
metadata {
name
}
displayName
clusterName
spec {
suspend
targetNamespace
}
}
}

mutation authCli_updateEnvironment($env: EnvironmentIn!) {
core_updateEnvironment(env: $env) {
id
}
}

mutation authCli_cloneEnvironment($clusterName: String!, $sourceEnvName: String!, $destinationEnvName: String!, $displayName: String!, $environmentRoutingMode: Github__com___kloudlite___operator___apis___crds___v1__EnvironmentRoutingMode!) {
core_cloneEnvironment(
clusterName: $clusterName
Expand Down Expand Up @@ -4896,11 +4904,13 @@ query authCli_listEnvironments($pq: CursorPaginationIn) {
displayName
markedForDeletion
clusterName
isArchived
metadata {
name
namespace
}
spec {
suspend
targetNamespace
}
status {
Expand Down Expand Up @@ -5047,6 +5057,20 @@ query authCli_listAccountClusters($pagination: CursorPaginationIn) {
}
}

query authCli_getBYOKCluster($name: String!) {
infra_getBYOKCluster(name: $name) {
clusterToken
displayName
lastOnlineAt
markedForDeletion
metadata {
labels
name
namespace
}
}
}

mutation authCli_createClusterReference($cluster: BYOKClusterIn!) {
infra_createBYOKCluster(cluster: $cluster) {
id
Expand Down
40 changes: 40 additions & 0 deletions src/apps/auth/server/gql/cli-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,14 @@ export const cliQueries = (executor: IExecutor) => ({
RawMessage
}
}
isArchived
metadata {
name
}
displayName
clusterName
spec {
suspend
targetNamespace
}
}
Expand All @@ -393,6 +395,21 @@ export const cliQueries = (executor: IExecutor) => ({
vars: (_: any) => {},
}
),

cli_updateEnvironment: executor(
gql`
mutation Core_updateEnvironment($env: EnvironmentIn!) {
core_updateEnvironment(env: $env) {
id
}
}
`,
{
transformer: (data: any) => data.core_updateEnvironment,
vars(_: any) {},
}
),

cli_cloneEnvironment: executor(
gql`
mutation Core_cloneEnvironment(
Expand Down Expand Up @@ -625,11 +642,13 @@ export const cliQueries = (executor: IExecutor) => ({
displayName
markedForDeletion
clusterName
isArchived
metadata {
name
namespace
}
spec {
suspend
targetNamespace
}
status {
Expand Down Expand Up @@ -843,6 +862,27 @@ export const cliQueries = (executor: IExecutor) => ({
vars(_: any) {},
}
),
cli_getBYOKCluster: executor(
gql`
query Infra_getBYOKCluster($name: String!) {
infra_getBYOKCluster(name: $name) {
clusterToken
displayName
lastOnlineAt
markedForDeletion
metadata {
labels
name
namespace
}
}
}
`,
{
transformer: (data: any) => data.infra_getBYOKCluster,
vars(_: any) {},
}
),
cli_createClusterReference: executor(
gql`
mutation Infra_createBYOKCluster($cluster: BYOKClusterIn!) {
Expand Down
18 changes: 16 additions & 2 deletions src/generated/gql/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3011,7 +3011,14 @@ export type AuthCli_GetEnvironmentQueryVariables = Exact<{
}>;


export type AuthCli_GetEnvironmentQuery = { core_getEnvironment?: { displayName: string, clusterName: string, status?: { isReady: boolean, message?: { RawMessage?: any } }, metadata?: { name: string }, spec?: { targetNamespace?: string } } };
export type AuthCli_GetEnvironmentQuery = { core_getEnvironment?: { isArchived?: boolean, displayName: string, clusterName: string, status?: { isReady: boolean, message?: { RawMessage?: any } }, metadata?: { name: string }, spec?: { suspend?: boolean, targetNamespace?: string } } };

export type AuthCli_UpdateEnvironmentMutationVariables = Exact<{
env: EnvironmentIn;
}>;


export type AuthCli_UpdateEnvironmentMutation = { core_updateEnvironment?: { id: string } };

export type AuthCli_CloneEnvironmentMutationVariables = Exact<{
clusterName: Scalars['String']['input'];
Expand Down Expand Up @@ -3069,7 +3076,7 @@ export type AuthCli_ListEnvironmentsQueryVariables = Exact<{
}>;


export type AuthCli_ListEnvironmentsQuery = { core_listEnvironments?: { totalCount: number, edges: Array<{ cursor: string, node: { displayName: string, markedForDeletion?: boolean, clusterName: string, metadata?: { name: string, namespace?: string }, spec?: { targetNamespace?: string }, status?: { isReady: boolean, message?: { RawMessage?: any } } } }>, pageInfo: { endCursor?: string, hasNextPage?: boolean, hasPrevPage?: boolean, startCursor?: string } } };
export type AuthCli_ListEnvironmentsQuery = { core_listEnvironments?: { totalCount: number, edges: Array<{ cursor: string, node: { displayName: string, markedForDeletion?: boolean, clusterName: string, isArchived?: boolean, metadata?: { name: string, namespace?: string }, spec?: { suspend?: boolean, targetNamespace?: string }, status?: { isReady: boolean, message?: { RawMessage?: any } } } }>, pageInfo: { endCursor?: string, hasNextPage?: boolean, hasPrevPage?: boolean, startCursor?: string } } };

export type AuthCli_GetKubeConfigQueryVariables = Exact<{
name: Scalars['String']['input'];
Expand Down Expand Up @@ -3125,6 +3132,13 @@ export type AuthCli_ListAccountClustersQueryVariables = Exact<{

export type AuthCli_ListAccountClustersQuery = { infra_listBYOKClusters?: { edges: Array<{ node: { clusterToken: string, displayName: string, lastOnlineAt?: any, id: string, metadata: { name: string, labels?: any } } }> } };

export type AuthCli_GetByokClusterQueryVariables = Exact<{
name: Scalars['String']['input'];
}>;


export type AuthCli_GetByokClusterQuery = { infra_getBYOKCluster?: { clusterToken: string, displayName: string, lastOnlineAt?: any, markedForDeletion?: boolean, metadata: { labels?: any, name: string, namespace?: string } } };

export type AuthCli_CreateClusterReferenceMutationVariables = Exact<{
cluster: ByokClusterIn;
}>;
Expand Down
Loading

0 comments on commit 9f632de

Please sign in to comment.