- 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
32 lines
623 B
TypeScript
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)
|
|
}
|
|
`
|
|
|