Get a specific category with values of the category attribute

Remember to change "buty" with your own category code (system name)

query catWithAttVal {
  category(code: "buty") {
    code
    attributeList {
      pageInfo {
        hasNextPage
        endCursor
      }
      edges {
        node {
          ...AttributeValue
        }
      }
    }
  }
}

fragment AttributeValue on AttributeValue {
  __typename
  attribute {
    code
    name {
      language
      value
    }
  }
  ... on TextAttributeValue {
    textAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on TextareaAttributeValue {
    textareaAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on DateAttributeValue {
    dateAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on UnitAttributeValue {
    unitAttribute: attribute {
      # unit might be useful in the value context
      unit {
        name
        symbol
      }
    }
    unitAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on PriceAttributeValue {
    priceAttribute: attribute {
      # currency might be useful in the price context
      currency
    }
    priceAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on NumberAttributeValue {
    numericAttributeValueTranslations: translations {
      value
      language
    }
  }
  ... on ProductRelationAttributeValue {
    productRelationAttributeValueTranslations: translations {
      value {
        sku
      }
      language
    }
  }
  ... on FileAttributeValue {
    fileAttributeValueTranslations: translations {
      value {
        ...Multimedia
      }
      language
    }
  }
  ... on GalleryAttributeValue {
    galleryAttributeValueTranslations: translations {
      value {
        ...Multimedia
      }
      language
    }
  }
  ... on ImageAttributeValue {
    imageAttributeValueTranslations: translations {
      value {
        ...Multimedia
      }
      language
    }
  }
  ... on MultiSelectAttributeValue {
    multiSelectAttributeValueTranslations: translations {
      translatedValue {
        ...OptionTranslatedValue
      }
      language
    }
  }
  ... on SelectAttributeValue {
    selectAttributeValueTranslations: translations {
      translatedValue {
        ...OptionTranslatedValue
      }
      language
    }
  }
}
fragment Multimedia on Multimedia {
  path
  name
  extension
  mime
  size
  alt {
    value
    language
  }
  title {
    value
    language
  }
  url
}
fragment OptionTranslatedValue on OptionTranslatedValue {
  code
  name
}

Last updated