#import "ee/security_dashboard/graphql/fragments/vulnerability_severities_count.fragment.graphql"

query vulnerabilitySeveritiesCount(
  $fullPath: ID = ""
  $projectId: [ID!]
  $severity: [VulnerabilitySeverity!]
  $reportType: [VulnerabilityReportType!]
  $scanner: [String!]
  $state: [VulnerabilityState!]
  $isGroup: Boolean = false
  $isProject: Boolean = false
  $isInstance: Boolean = false
) {
  instance: instanceSecurityDashboard @include(if: $isInstance) {
    vulnerabilitySeveritiesCount(
      projectId: $projectId
      severity: $severity
      reportType: $reportType
      scanner: $scanner
      state: $state
    ) {
      ...VulnerabilitySeveritiesCount
    }
  }
  group(fullPath: $fullPath) @include(if: $isGroup) {
    vulnerabilitySeveritiesCount(
      projectId: $projectId
      severity: $severity
      reportType: $reportType
      scanner: $scanner
      state: $state
    ) {
      ...VulnerabilitySeveritiesCount
    }
  }
  project(fullPath: $fullPath) @include(if: $isProject) {
    vulnerabilitySeveritiesCount(
      severity: $severity
      reportType: $reportType
      scanner: $scanner
      state: $state
    ) {
      ...VulnerabilitySeveritiesCount
    }
  }
}
