Files
Sankofa/src/lib/graphql/queries/resources.ts
defiQUG 6f28146ac3 Initial Phoenix Sankofa Cloud setup
- Complete project structure with Next.js frontend
- GraphQL API backend with Apollo Server
- Portal application with NextAuth
- Crossplane Proxmox provider
- GitOps configurations
- CI/CD pipelines
- Testing infrastructure (Vitest, Jest, Go tests)
- Error handling and monitoring
- Security hardening
- UI component library
- Documentation
2025-11-28 12:54:33 -08:00

105 lines
1.5 KiB
TypeScript

import { gql } from '@apollo/client'
// Query for getting all regions
export const GET_REGIONS = gql`
query GetRegions {
regions {
id
name
code
country
coordinates {
latitude
longitude
}
sites {
id
name
}
clusters {
id
name
}
}
}
`
// Query for getting a specific region
export const GET_REGION = gql`
query GetRegion($id: ID!) {
region(id: $id) {
id
name
code
country
coordinates {
latitude
longitude
}
sites {
id
name
clusters {
id
name
}
}
clusters {
id
name
nodes {
id
name
health
}
}
}
}
`
// Query for getting resources
export const GET_RESOURCES = gql`
query GetResources($filter: ResourceFilter) {
resources(filter: $filter) {
id
name
type
region {
id
name
}
health
metadata
}
}
`
// Query for getting network topology
export const GET_NETWORK_TOPOLOGY = gql`
query GetNetworkTopology($regionId: ID) {
networkTopology(regionId: $regionId) {
nodes {
id
name
type
position {
x
y
z
}
health
}
edges {
id
from
to
type
latency
bandwidth
status
}
}
}
`