You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

114 lines
11 KiB

  1. # Copyright © Magento, Inc. All rights reserved.
  2. # See COPYING.txt for license details.
  3. type Mutation {
  4. addConfigurableProductsToCart(input: AddConfigurableProductsToCartInput @doc(description: "An input object that defines which configurable products to add to the cart.")): AddConfigurableProductsToCartOutput @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\AddConfigurableProductsToCart") @doc(description: "Add one or more configurable products to the specified cart. We recommend using `addProductsToCart` instead.")
  5. }
  6. type ConfigurableProduct implements ProductInterface, RoutableInterface, PhysicalProductInterface, CustomizableProductInterface @doc(description: "Defines basic features of a configurable product and its simple product variants.") {
  7. variants: [ConfigurableVariant] @doc(description: "An array of simple product variants.") @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\ConfigurableVariant")
  8. configurable_options: [ConfigurableProductOptions] @doc(description: "An array of options for the configurable product.") @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\Options")
  9. configurable_product_options_selection(configurableOptionValueUids: [ID!]): ConfigurableProductOptionsSelection @doc(description: "An array of media gallery items and other details about selected configurable product options as well as details about remaining selectable options.") @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\OptionsSelectionMetadata")
  10. }
  11. type ConfigurableVariant @doc(description: "Contains all the simple product variants of a configurable product.") {
  12. attributes: [ConfigurableAttributeOption] @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\Variant\\Attributes") @doc(description: "An array of configurable attribute options.")
  13. product: SimpleProduct @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Product") @doc(description: "An array of linked simple products.")
  14. }
  15. type ConfigurableAttributeOption @doc(description: "Contains details about a configurable product attribute option.") {
  16. label: String @doc(description: "A string that describes the configurable attribute option.")
  17. code: String @doc(description: "The ID assigned to the attribute.")
  18. value_index: Int @doc(description: "A unique index number assigned to the configurable product option.")
  19. uid: ID! @doc(description: "The unique ID for a `ConfigurableAttributeOption` object.") @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\Variant\\Attributes\\ConfigurableAttributeUid")
  20. }
  21. type ConfigurableProductOptions @doc(description: "Defines configurable attributes for the specified product.") {
  22. id: Int @deprecated(reason: "Use `uid` instead.") @doc(description: "The configurable option ID number assigned by the system.")
  23. uid: ID! @doc(description: "The unique ID for a `ConfigurableProductOptions` object.")
  24. attribute_id: String @deprecated(reason: "Use `attribute_uid` instead.") @doc(description: "The ID assigned to the attribute.")
  25. attribute_id_v2: Int @deprecated(reason: "Use `attribute_uid` instead.") @doc(description: "The ID assigned to the attribute.")
  26. attribute_uid: ID! @doc(description: "The unique ID for an `Attribute` object.")
  27. attribute_code: String @doc(description: "A string that identifies the attribute.")
  28. label: String @doc(description: "A displayed string that describes the configurable product option.")
  29. position: Int @doc(description: "A number that indicates the order in which the attribute is displayed.")
  30. use_default: Boolean @doc(description: "Indicates whether the option is the default.")
  31. values: [ConfigurableProductOptionsValues] @doc(description: "An array that defines the `value_index` codes assigned to the configurable product.")
  32. product_id: Int @deprecated(reason: "`product_id` is not needed and can be obtained from its parent.") @doc(description: "This is the same as a product's `id` field.")
  33. }
  34. type ConfigurableProductOptionsValues @doc(description: "Contains the index number assigned to a configurable product option.") {
  35. value_index: Int @deprecated(reason: "Use `uid` instead.") @doc(description: "A unique index number assigned to the configurable product option.")
  36. uid: ID @doc(description: "The unique ID for a `ConfigurableProductOptionsValues` object.") @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\Variant\\Attributes\\ConfigurableAttributeUid")
  37. label: String @doc(description: "The label of the product.")
  38. default_label: String @doc(description: "The label of the product on the default store.")
  39. store_label: String @doc(description: "The label of the product on the current store.")
  40. use_default_value: Boolean @doc(description: "Indicates whether to use the default_label.")
  41. }
  42. input AddConfigurableProductsToCartInput @doc(description: "Defines the configurable products to add to the cart.") {
  43. cart_id: String! @doc(description: "The ID of the cart.")
  44. cart_items: [ConfigurableProductCartItemInput!]! @doc(description: "An array of configurable products to add.")
  45. }
  46. type AddConfigurableProductsToCartOutput @doc(description: "Contains details about the cart after adding configurable products.") {
  47. cart: Cart! @doc(description: "The cart after adding products.")
  48. }
  49. input ConfigurableProductCartItemInput {
  50. data: CartItemInput! @doc(description: "The quantity and SKU of the configurable product.")
  51. variant_sku: String @doc(description: "Deprecated. Use `CartItemInput.sku` instead.")
  52. parent_sku: String @doc(description: "The SKU of the parent configurable product.")
  53. customizable_options:[CustomizableOptionInput!] @doc(description: "The ID and value of the option.")
  54. }
  55. type ConfigurableCartItem implements CartItemInterface @doc(description: "An implementation for configurable product cart items.") {
  56. customizable_options: [SelectedCustomizableOption]! @resolver(class: "Magento\\QuoteGraphQl\\Model\\Resolver\\CustomizableOptions") @doc(description: "An array containing the customizable options the shopper selected.")
  57. configurable_options: [SelectedConfigurableOption!]! @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\ConfigurableCartItemOptions") @doc(description: "An array containing the configuranle options the shopper selected.")
  58. configured_variant: ProductInterface! @doc(description: "Product details of the cart item.") @resolver(class: "\\Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\ProductResolver")
  59. }
  60. type SelectedConfigurableOption @doc(description: "Contains details about a selected configurable option.") {
  61. id: Int! @deprecated(reason: "Use `SelectedConfigurableOption.configurable_product_option_uid` instead.")
  62. configurable_product_option_uid: ID! @doc(description: "The unique ID for a `ConfigurableProductOptions` object.")
  63. option_label: String! @doc(description: "The display text for the option.")
  64. value_id: Int! @deprecated(reason: "Use `SelectedConfigurableOption.configurable_product_option_value_uid` instead.")
  65. configurable_product_option_value_uid: ID! @doc(description: "The unique ID for a `ConfigurableProductOptionsValues` object.")
  66. value_label: String! @doc(description: "The display name of the selected configurable option.")
  67. }
  68. type ConfigurableWishlistItem implements WishlistItemInterface @doc(description: "A configurable product wish list item."){
  69. child_sku: String! @deprecated(reason: "Use `ConfigurableWishlistItem.configured_variant.sku` instead.") @doc(description: "The SKU of the simple product corresponding to a set of selected configurable options.") @resolver(class: "\\Magento\\ConfigurableProductGraphQl\\Model\\Wishlist\\ChildSku")
  70. configurable_options: [SelectedConfigurableOption!] @resolver(class: "\\Magento\\ConfigurableProductGraphQl\\Model\\Wishlist\\ConfigurableOptions") @doc(description: "An array of selected configurable options.")
  71. configured_variant: ProductInterface @doc(description: "Product details of the selected variant. The value is null if some options are not configured.") @resolver(class: "\\Magento\\ConfigurableProductGraphQl\\Model\\Wishlist\\ConfiguredVariant")
  72. }
  73. type ConfigurableProductOptionsSelection @doc(description: "Contains metadata corresponding to the selected configurable options.") {
  74. options_available_for_selection: [ConfigurableOptionAvailableForSelection!] @doc(description: "The configurable options available for further selection based on the current selection.")
  75. configurable_options: [ConfigurableProductOption!] @doc(description: "An array of all possible configurable options.")
  76. media_gallery: [MediaGalleryInterface!] @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\SelectionMediaGallery") @doc(description: "Product images and videos corresponding to the specified configurable options selection.")
  77. variant: SimpleProduct @resolver(class: "Magento\\ConfigurableProductGraphQl\\Model\\Resolver\\Variant\\Variant") @doc(description: "A variant represented by the specified configurable options selection. The value is expected to be null until selections are made for each configurable option.")
  78. }
  79. type ConfigurableOptionAvailableForSelection @doc(description: "Describes configurable options that have been selected and can be selected as a result of the previous selections.") {
  80. option_value_uids: [ID!]! @doc(description: "An array of selectable option value IDs.")
  81. attribute_code: String! @doc(description: "An attribute code that uniquely identifies a configurable option.")
  82. }
  83. type ConfigurableProductOption @doc(description: "Contains details about configurable product options.") {
  84. uid: ID! @doc(description: "The unique ID of the configurable option.")
  85. attribute_code: String! @doc(description: "An attribute code that uniquely identifies a configurable option.")
  86. label: String! @doc(description: "The display name of the option.")
  87. values: [ConfigurableProductOptionValue!] @doc(description: "An array of values that are applicable for this option.")
  88. }
  89. type ConfigurableProductOptionValue @doc(description: "Defines a value for a configurable product option.") {
  90. uid: ID! @doc(description: "The unique ID of the value.")
  91. is_available: Boolean! @doc(description: "Indicates whether the product is available with this selected option.")
  92. is_use_default: Boolean! @doc(description: "Indicates whether the value is the default.")
  93. label: String! @doc(description: "The display name of the value.")
  94. }
  95. type StoreConfig {
  96. configurable_thumbnail_source : String @doc(description: "Indicates whether the `parent` or child (`itself`) thumbnail should be used in the cart for configurable products.")
  97. }