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)
  }
`

