Files
Sankofa/src/lib/graphql/queries/metrics.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

32 lines
623 B
TypeScript

import { gql } from '@apollo/client'
// Query for getting metrics
export const GET_METRICS = gql`
query GetMetrics($resourceId: ID!, $metricType: MetricType!, $timeRange: TimeRange!) {
metrics(resourceId: $resourceId, metricType: $metricType, timeRange: $timeRange) {
resource {
id
name
}
metricType
values {
timestamp
value
labels
}
timeRange {
start
end
}
}
}
`
// Query for getting health status
export const GET_HEALTH = gql`
query GetHealth($resourceId: ID!) {
health(resourceId: $resourceId)
}
`