Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

54 lignes
2.0 KiB

  1. # Copyright © Magento, Inc. All rights reserved.
  2. # See COPYING.txt for license details.
  3. interface ProductInterface {
  4. swatch_image: String @doc(description: "The file name of a swatch image.")
  5. }
  6. input ProductFilterInput {
  7. swatch_image: FilterTypeInput @doc(description: "The file name of a swatch image.")
  8. }
  9. input ProductSortInput {
  10. swatch_image: SortEnum @doc(description: "Indicates the criteria to sort swatches.")
  11. }
  12. interface SwatchLayerFilterItemInterface @typeResolver(class: "Magento\\SwatchesGraphQl\\Model\\Resolver\\SwatchLayerFilterItemResolver")
  13. {
  14. swatch_data: SwatchData @doc(description: "Data required to render a swatch filter item.")
  15. }
  16. type SwatchLayerFilterItem implements LayerFilterItemInterface, SwatchLayerFilterItemInterface
  17. {
  18. }
  19. type SwatchData @doc(description: "Describes the swatch type and a value.") {
  20. type: String @doc(description: "The type of swatch filter item: 1 - text; 2 - image.")
  21. value: String @doc(description: "The value for the swatch item. It could be text or an image link.")
  22. }
  23. type ConfigurableProductOptionsValues {
  24. swatch_data: SwatchDataInterface @doc(description: "Swatch data for a configurable product option.") @resolver(class: "Magento\\SwatchesGraphQl\\Model\\Resolver\\Product\\Options\\SwatchData")
  25. }
  26. interface SwatchDataInterface @typeResolver(class: "Magento\\SwatchesGraphQl\\Model\\Resolver\\Product\\Options\\SwatchDataTypeResolver") {
  27. value: String @doc(description: "The value can be represented as color (HEX code), image link, or text.")
  28. }
  29. type ImageSwatchData implements SwatchDataInterface {
  30. thumbnail: String @doc(description: "The URL assigned to the thumbnail of the swatch image.")
  31. }
  32. type TextSwatchData implements SwatchDataInterface {
  33. }
  34. type ColorSwatchData implements SwatchDataInterface {
  35. }
  36. type ConfigurableProductOptionValue {
  37. swatch: SwatchDataInterface @resolver(class: "Magento\\SwatchesGraphQl\\Model\\Resolver\\Product\\Options\\SwatchData") @doc(description: "The URL assigned to the thumbnail of the swatch image.")
  38. }