Skip to content

Commit

Permalink
🎨 Updated cli queries
Browse files Browse the repository at this point in the history
  • Loading branch information
abdheshnayak committed Jan 14, 2024
1 parent f8548ad commit ba092f2
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 40 deletions.
49 changes: 28 additions & 21 deletions src/apps/auth/server/gql/cli-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,33 +540,40 @@ export const cliQueries = (executor: IExecutor) => ({
),
cli_listDevices: executor(
gql`
query Core_listVPNDevicesForUser {
core_listVPNDevicesForUser {
displayName
environmentName
markedForDeletion
metadata {
name
namespace
}
projectName
spec {
cnameRecords {
host
target
}
deviceNamespace
disabled
ports {
port
targetPort
query Infra_listVPNDevices($pq: CursorPaginationIn) {
infra_listVPNDevices(pq: $pq) {
edges {
node {
displayName
metadata {
name
}
spec {
deviceNamespace
disabled
nodeSelector
ports {
port
targetPort
}
}
status {
isReady
message {
RawMessage
}
}
wireguardConfig {
encoding
value
}
}
}
}
}
`,
{
transformer: (data: any) => data.core_listVPNDevicesForUser,
transformer: (data: any) => data.infra_listVPNDevices,
vars: (_: any) => {},
}
),
Expand Down
40 changes: 21 additions & 19 deletions src/apps/auth/server/gql/queries/infra-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,33 @@ export const infraQueries = (executor: IExecutor) => ({
),
cli_listCoreDevices: executor(
gql`
query Core_listVPNDevices($pq: CursorPaginationIn) {
core_listVPNDevices(pq: $pq) {
edges {
cursor
node {
displayName
environmentName
metadata {
name
}
projectName
spec {
disabled
ports {
port
targetPort
}
}
query Core_listVPNDevicesForUser {
core_listVPNDevicesForUser {
displayName
environmentName
markedForDeletion
metadata {
name
namespace
}
projectName
spec {
cnameRecords {
host
target
}
deviceNamespace
disabled
ports {
port
targetPort
}
}
}
}
`,
{
transformer: (data: any) => data.core_listVPNDevices,
transformer: (data: any) => data.core_listVPNDevicesForUser,
vars: (_: any) => {},
}
),
Expand Down

0 comments on commit ba092f2

Please sign in to comment.