# import PaginatorParts from '../fragments/paginator.fragment.graphql'

fragment ManufacturerParts on Manufacturer {
  id
  name
  is_approved
  slug
  description
  website
  socials {
    url
    icon
  }
  image {
    id
    original
    thumbnail
  }
  type {
    id
    name
    slug
  }
  cover_image {
    id
    original
    thumbnail
  }
}
query Manufacturers(
  $hasType: QueryManufacturersHasTypeWhereHasConditions
  $text: String
  $is_approved: Boolean
  $orderBy: [QueryManufacturersOrderByOrderByClause!]
  $first: Int = 15
  $page: Int
  $language: String
) {
  manufacturers(
    text: $text
    orderBy: $orderBy
    hasType: $hasType
    is_approved: $is_approved
    first: $first
    page: $page
    language: $language
  ) {
    data {
      ...ManufacturerParts
    }
    paginatorInfo {
      ...PaginatorParts
    }
  }
}
query TopManufacturers($limit: Int = 15, $language: String) {
  topManufacturers(limit: $limit, language: $language) {
    ...ManufacturerParts
  }
}
query Manufacturer($slug: String, $language: String) {
  manufacturer(slug: $slug, language: $language) {
    ...ManufacturerParts
  }
}
