schema.graphqls 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # Copyright © Magento, Inc. All rights reserved.
  2. # See COPYING.txt for license details.
  3. type ConfigurableProduct implements ProductInterface, PhysicalProductInterface, CustomizableProductInterface @doc(description: "ConfigurableProduct defines basic features of a configurable product and its simple product variants") {
  4. variants: [ConfigurableVariant] @doc(description: "An array of variants of products") @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\ConfigurableVariant")
  5. configurable_options: [ConfigurableProductOptions] @doc(description: "An array of linked simple product items") @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\Options")
  6. }
  7. type ConfigurableVariant @doc(description: "An array containing all the simple product variants of a configurable product") {
  8. attributes: [ConfigurableAttributeOption] @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\Variant\\Attributes") @doc(description: "")
  9. product: SimpleProduct @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Product")
  10. }
  11. type ConfigurableAttributeOption @doc(description: "ConfigurableAttributeOption contains the value_index (and other related information) assigned to a configurable product option") {
  12. label: String @doc(description: "A string that describes the configurable attribute option")
  13. code: String @doc(description: "The ID assigned to the attribute")
  14. value_index: Int @doc(description: "A unique index number assigned to the configurable product option")
  15. }
  16. type ConfigurableProductOptions @doc(description: "ConfigurableProductOptions defines configurable attributes for the specified product") {
  17. id: Int @doc(description: "The configurable option ID number assigned by the system")
  18. attribute_id: String @doc(description: "The ID assigned to the attribute")
  19. attribute_code: String @doc(description: "A string that identifies the attribute")
  20. label: String @doc(description: "A string that describes the configurable product option, which is displayed on the UI")
  21. position: Int @doc(description: "A number that indicates the order in which the attribute is displayed")
  22. use_default: Boolean @doc(description: "Indicates whether the option is the default")
  23. values: [ConfigurableProductOptionsValues] @doc(description: "An array that defines the value_index codes assigned to the configurable product")
  24. product_id: Int @doc(description: "This is the same as a product's id field")
  25. }
  26. type ConfigurableProductOptionsValues @doc(description: "ConfigurableProductOptionsValues contains the index number assigned to a configurable product option") {
  27. value_index: Int @doc(description: "A unique index number assigned to the configurable product option")
  28. label: String @doc(description: "The label of the product")
  29. default_label: String @doc(description: "The label of the product on the default store")
  30. store_label: String @doc(description: "The label of the product on the current store")
  31. use_default_value: Boolean @doc(description: "Indicates whether to use the default_label")
  32. }