schema.graphqls 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright © Magento, Inc. All rights reserved.
  2. # See COPYING.txt for license details.
  3. type BundleItem @doc(description: "BundleItem defines an individual item in a bundle product") {
  4. option_id: Int @doc(description: "An ID assigned to each type of item in a bundle product")
  5. title: String @doc(description: "The display name of the item")
  6. required: Boolean @doc(description: "Indicates whether the item must be included in the bundle")
  7. type: String @doc(description: "The input type that the customer uses to select the item. Examples include radio button and checkbox")
  8. position: Int @doc(description: "he relative position of this item compared to the other bundle items")
  9. sku: String @doc(description: "The SKU of the bundle product")
  10. options: [BundleItemOption] @doc(description: "An array of additional options for this bundle item") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\BundleItemLinks")
  11. }
  12. type BundleItemOption @doc(description: "BundleItemOption defines characteristics and options for a specific bundle item") {
  13. id: Int @doc(description: "The ID assigned to the bundled item option")
  14. label: String @doc(description: "The text that identifies the bundled item option") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Options\\Label")
  15. qty: Float @doc(description: "Indicates the quantity of this specific bundle item")
  16. position: Int @doc(description: "When a bundle item contains multiple options, the relative position of this option compared to the other options")
  17. is_default: Boolean @doc(description: "Indicates whether this option is the default option")
  18. price: Float @doc(description: "The price of the selected option")
  19. price_type: PriceTypeEnum @doc(description: "One of FIXED, PERCENT, or DYNAMIC")
  20. can_change_quantity: Boolean @doc(description: "Indicates whether the customer can change the number of items for this option")
  21. product: ProductInterface @doc(description: "Contains details about this product option") @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Product")
  22. }
  23. type BundleProduct implements ProductInterface, PhysicalProductInterface, CustomizableProductInterface @doc(description: "BundleProduct defines basic features of a bundle product and contains multiple BundleItems") {
  24. price_view: PriceViewEnum @doc(description: "One of PRICE_RANGE or AS_LOW_AS") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Product\\Fields\\PriceView")
  25. dynamic_price: Boolean @doc(description: "Indicates whether the bundle product has a dynamic price") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Product\\Fields\\DynamicPrice")
  26. dynamic_sku: Boolean @doc(description: "Indicates whether the bundle product has a dynamic SK") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Product\\Fields\\DynamicSku")
  27. ship_bundle_items: ShipBundleItemsEnum @doc(description: "Indicates whether to ship bundle items together or individually") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Product\\Fields\\ShipBundleItems")
  28. dynamic_weight: Boolean @doc(description: "Indicates whether the bundle product has a dynamically calculated weight") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Product\\Fields\\DynamicWeight")
  29. items: [BundleItem] @doc(description: "An array containing information about individual bundle items") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\BundleItems")
  30. }
  31. enum PriceViewEnum @doc(description: "This enumeration defines whether a bundle product's price is displayed as the lowest possible value or as a range.") {
  32. PRICE_RANGE
  33. AS_LOW_AS
  34. }
  35. enum ShipBundleItemsEnum @doc(description: "This enumeration defines whether bundle items must be shipped together.") {
  36. TOGETHER
  37. SEPARATELY
  38. }