Skip to content

Commit

Permalink
Merge branch '2.4-develop' into 2.4-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
kanhaiya5590 authored Nov 10, 2021
2 parents bd4996f + 35e4ae6 commit 1918bc2
Show file tree
Hide file tree
Showing 48 changed files with 1,906 additions and 1,697 deletions.
112 changes: 56 additions & 56 deletions app/code/Magento/BundleGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,67 @@
# See COPYING.txt for license details.

type Mutation {
addBundleProductsToCart(input: AddBundleProductsToCartInput): AddBundleProductsToCartOutput @resolver(class: "Magento\\QuoteGraphQl\\Model\\Resolver\\AddSimpleProductsToCart")
addBundleProductsToCart(input: AddBundleProductsToCartInput @doc(description: "An input object that defines which bundle products to add to the cart.")): AddBundleProductsToCartOutput @resolver(class: "Magento\\QuoteGraphQl\\Model\\Resolver\\AddSimpleProductsToCart") @doc(description: "Add one or more bundle products to the specified cart. We recommend using `addProductsToCart` instead.")
}

input AddBundleProductsToCartInput {
cart_id: String!
cart_items: [BundleProductCartItemInput!]!
input AddBundleProductsToCartInput @doc(description: "Defines the bundle products to add to the cart.") {
cart_id: String! @doc(description: "The ID of the cart.")
cart_items: [BundleProductCartItemInput!]! @doc(description: "An array of bundle products to add.")
}

input BundleProductCartItemInput {
data: CartItemInput!
bundle_options:[BundleOptionInput!]!
customizable_options:[CustomizableOptionInput!]
input BundleProductCartItemInput @doc(description: "Defines a single bundle product.") {
data: CartItemInput! @doc(description: "The quantity and SKU of the bundle product.")
bundle_options:[BundleOptionInput!]! @doc(description: "A mandatory array of options for the bundle product, including each chosen option and specified quantity.")
customizable_options:[CustomizableOptionInput!] @doc(description: "The ID and value of the option.")
}

input BundleOptionInput {
id: Int!
quantity: Float!
value: [String!]!
input BundleOptionInput @doc(description: "Defines the input for a bundle option.") {
id: Int! @doc(description: "The ID of the option.")
quantity: Float! @doc(description: "The number of the selected item to add to the cart.")
value: [String!]! @doc(description: "An array with the chosen value of the option.")
}

type AddBundleProductsToCartOutput {
cart: Cart!
type AddBundleProductsToCartOutput @doc(description: "Contains details about the cart after adding bundle products.") {
cart: Cart! @doc(description: "The cart after adding products.")
}

type BundleCartItem implements CartItemInterface {
customizable_options: [SelectedCustomizableOption]! @resolver(class: "Magento\\QuoteGraphQl\\Model\\Resolver\\CustomizableOptions")
bundle_options: [SelectedBundleOption!]! @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\BundleOption")
type BundleCartItem implements CartItemInterface @doc(description: "An implementation for bundle product cart items.") {
customizable_options: [SelectedCustomizableOption]! @resolver(class: "Magento\\QuoteGraphQl\\Model\\Resolver\\CustomizableOptions") @doc(description: "An array containing the customizable options the shopper selected.")
bundle_options: [SelectedBundleOption!]! @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\BundleOption") @doc(description: "An array containing the bundle options the shopper selected.")
}

type SelectedBundleOption {
type SelectedBundleOption @doc(description: "Contains details about a selected bundle option.") {
id: Int! @deprecated(reason: "Use `uid` instead")
uid: ID! @doc(description: "The unique ID for a `SelectedBundleOption` object")
label: String!
type: String!
values: [SelectedBundleOptionValue!]!
label: String! @doc(description: "The display name of the selected bundle product option.")
type: String! @doc(description: "The type of selected bundle product option.")
values: [SelectedBundleOptionValue!]! @doc(description: "An array of selected bundle option values.")
}

type SelectedBundleOptionValue {
type SelectedBundleOptionValue @doc(description: "Contains details about a value for a selected bundle option.") {
id: Int! @doc(description: "Use `uid` instead")
uid: ID! @doc(description: "The unique ID for a `SelectedBundleOptionValue` object")
label: String!
quantity: Float!
price: Float!
label: String! @doc(description: "The display name of the value for the selected bundle product option.")
quantity: Float! @doc(description: "The quantity of the value for the selected bundle product option.")
price: Float! @doc(description: "The price of the value for the selected bundle product option.")
}

type BundleItem @doc(description: "BundleItem defines an individual item in a bundle product.") {
type BundleItem @doc(description: "Defines an individual item within a bundle product.") {
option_id: Int @deprecated(reason: "Use `uid` instead") @doc(description: "An ID assigned to each type of item in a bundle product.")
uid: ID @doc(description: "The unique ID for a `BundleItem` object.")
title: String @doc(description: "The display name of the item.")
required: Boolean @doc(description: "Indicates whether the item must be included in the bundle.")
type: String @doc(description: "The input type that the customer uses to select the item. Examples include radio button and checkbox.")
position: Int @doc(description: "he relative position of this item compared to the other bundle items.")
position: Int @doc(description: "A number indicating the sequence order of this item compared to the other bundle items.")
sku: String @doc(description: "The SKU of the bundle product.")
options: [BundleItemOption] @doc(description: "An array of additional options for this bundle item.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\BundleItemLinks")
}

type BundleItemOption @doc(description: "BundleItemOption defines characteristics and options for a specific bundle item.") {
type BundleItemOption @doc(description: "Defines the characteristics that comprise a specific bundle item and its options.") {
id: Int @deprecated(reason: "Use `uid` instead") @doc(description: "The ID assigned to the bundled item option.")
label: String @doc(description: "The text that identifies the bundled item option.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Options\\Label")
qty: Float @deprecated(reason: "The `qty` is deprecated. Use `quantity` instead.") @doc(description: "Indicates the quantity of this specific bundle item.")
quantity: Float @doc(description: "Indicates the quantity of this specific bundle item.")
qty: Float @deprecated(reason: "Use `quantity` instead.") @doc(description: "Indicates the quantity of this specific bundle item.")
quantity: Float @doc(description: "The quantity of this specific bundle item.")
position: Int @doc(description: "When a bundle item contains multiple options, the relative position of this option compared to the other options.")
is_default: Boolean @doc(description: "Indicates whether this option is the default option.")
price: Float @doc(description: "The price of the selected option.")
Expand All @@ -72,57 +72,57 @@ type BundleItemOption @doc(description: "BundleItemOption defines characteristic
uid: ID! @doc(description: "The unique ID for a `BundleItemOption` object.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Options\\BundleItemOptionUid")
}

type BundleProduct implements ProductInterface, RoutableInterface, PhysicalProductInterface, CustomizableProductInterface @doc(description: "Defines basic features of a bundle product and contains multiple BundleItems") {
type BundleProduct implements ProductInterface, RoutableInterface, PhysicalProductInterface, CustomizableProductInterface @doc(description: "Defines basic features of a bundle product and contains multiple BundleItems.") {
price_view: PriceViewEnum @doc(description: "One of PRICE_RANGE or AS_LOW_AS.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Product\\Fields\\PriceView")
dynamic_price: Boolean @doc(description: "Indicates whether the bundle product has a dynamic price.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Product\\Fields\\DynamicPrice")
dynamic_sku: Boolean @doc(description: "Indicates whether the bundle product has a dynamic SK.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Product\\Fields\\DynamicSku")
dynamic_sku: Boolean @doc(description: "Indicates whether the bundle product has a dynamic SKU.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Product\\Fields\\DynamicSku")
ship_bundle_items: ShipBundleItemsEnum @doc(description: "Indicates whether to ship bundle items together or individually.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Product\\Fields\\ShipBundleItems")
dynamic_weight: Boolean @doc(description: "Indicates whether the bundle product has a dynamically calculated weight.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Product\\Fields\\DynamicWeight")
items: [BundleItem] @doc(description: "An array containing information about individual bundle items.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\BundleItems")
}

enum PriceViewEnum @doc(description: "This enumeration defines whether a bundle product's price is displayed as the lowest possible value or as a range.") {
enum PriceViewEnum @doc(description: "Defines whether a bundle product's price is displayed as the lowest possible value or as a range.") {
PRICE_RANGE
AS_LOW_AS
}

enum ShipBundleItemsEnum @doc(description: "This enumeration defines whether bundle items must be shipped together.") {
enum ShipBundleItemsEnum @doc(description: "Defines whether bundle items must be shipped together.") {
TOGETHER
SEPARATELY
}

type BundleOrderItem implements OrderItemInterface {
bundle_options: [ItemSelectedBundleOption] @doc(description: "A list of bundle options that are assigned to the bundle product") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Order\\Item\\BundleOptions")
type BundleOrderItem implements OrderItemInterface @doc(description: "Defines bundle product options for `OrderItemInterface`.") {
bundle_options: [ItemSelectedBundleOption] @doc(description: "A list of bundle options that are assigned to the bundle product.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Order\\Item\\BundleOptions")
}

type BundleInvoiceItem implements InvoiceItemInterface{
bundle_options: [ItemSelectedBundleOption] @doc(description: "A list of bundle options that are assigned to the bundle product") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Order\\Item\\BundleOptions")
type BundleInvoiceItem implements InvoiceItemInterface @doc(description: "Defines bundle product options for `InvoiceItemInterface`.") {
bundle_options: [ItemSelectedBundleOption] @doc(description: "A list of bundle options that are assigned to an invoiced bundle product.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Order\\Item\\BundleOptions")
}

type BundleShipmentItem implements ShipmentItemInterface {
bundle_options: [ItemSelectedBundleOption] @doc(description: "A list of bundle options that are assigned to the bundle product") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Order\\Item\\BundleOptions")
type BundleShipmentItem implements ShipmentItemInterface @doc(description: "Defines bundle product options for `ShipmentItemInterface`.") {
bundle_options: [ItemSelectedBundleOption] @doc(description: "A list of bundle options that are assigned to a shipped product.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Order\\Item\\BundleOptions")
}

type BundleCreditMemoItem implements CreditMemoItemInterface {
bundle_options: [ItemSelectedBundleOption] @doc(description: "A list of bundle options that are assigned to the bundle product") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Order\\Item\\BundleOptions")
type BundleCreditMemoItem implements CreditMemoItemInterface @doc(description: "Defines bundle product options for `CreditMemoItemInterface`.") {
bundle_options: [ItemSelectedBundleOption] @doc(description: "A list of bundle options that are assigned to a bundle product that is part of a credit memo.") @resolver(class: "Magento\\BundleGraphQl\\Model\\Resolver\\Order\\Item\\BundleOptions")
}

type ItemSelectedBundleOption @doc(description: "A list of options of the selected bundle product") {
id: ID! @deprecated(reason: "Use `uid` instead") @doc(description: "The unique ID for a `ItemSelectedBundleOption` object")
uid: ID! @doc(description: "The unique ID for a `ItemSelectedBundleOption` object")
label: String! @doc(description: "The label of the option")
values: [ItemSelectedBundleOptionValue] @doc(description: "A list of products that represent the values of the parent option")
type ItemSelectedBundleOption @doc(description: "A list of options of the selected bundle product.") {
id: ID! @deprecated(reason: "Use `uid` instead.") @doc(description: "The unique ID for a `ItemSelectedBundleOption` object.")
uid: ID! @doc(description: "The unique ID for a `ItemSelectedBundleOption` object.")
label: String! @doc(description: "The label of the option.")
values: [ItemSelectedBundleOptionValue] @doc(description: "A list of products that represent the values of the parent option.")
}

type ItemSelectedBundleOptionValue @doc(description: "A list of values for the selected bundle product") {
id: ID! @deprecated(reason: "Use `uid` instead") @doc(description: "The unique ID for a `ItemSelectedBundleOptionValue` object")
uid: ID! @doc(description: "The unique ID for a `ItemSelectedBundleOptionValue` object")
product_name: String! @doc(description: "The name of the child bundle product")
product_sku: String! @doc(description: "The SKU of the child bundle product")
quantity: Float! @doc(description: "Indicates how many of this bundle product were ordered")
price: Money! @doc(description: "The price of the child bundle product")
type ItemSelectedBundleOptionValue @doc(description: "A list of values for the selected bundle product.") {
id: ID! @deprecated(reason: "Use `uid` instead.") @doc(description: "The unique ID for a `ItemSelectedBundleOptionValue` object.")
uid: ID! @doc(description: "The unique ID for a `ItemSelectedBundleOptionValue` object.")
product_name: String! @doc(description: "The name of the child bundle product.")
product_sku: String! @doc(description: "The SKU of the child bundle product.")
quantity: Float! @doc(description: "The number of this bundle product that were ordered.")
price: Money! @doc(description: "The price of the child bundle product.")
}

type BundleWishlistItem implements WishlistItemInterface {
bundle_options: [SelectedBundleOption!] @doc(description: "An array containing information about the selected bundle items") @resolver(class: "\\Magento\\BundleGraphQl\\Model\\Wishlist\\BundleOptions")
type BundleWishlistItem implements WishlistItemInterface @doc(description: "Defines bundle product options for `WishlistItemInterface`.") {
bundle_options: [SelectedBundleOption!] @doc(description: "An array containing information about the selected bundle items.") @resolver(class: "\\Magento\\BundleGraphQl\\Model\\Wishlist\\BundleOptions")
}
4 changes: 2 additions & 2 deletions app/code/Magento/CatalogCmsGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# See COPYING.txt for license details.

interface CategoryInterface {
cms_block: CmsBlock @doc(description: "Category CMS Block.") @resolver(class: "Magento\\CatalogCmsGraphQl\\Model\\Resolver\\Category\\Block")
}
cms_block: CmsBlock @doc(description: "Contains a category CMS block.") @resolver(class: "Magento\\CatalogCmsGraphQl\\Model\\Resolver\\Category\\Block")
}
20 changes: 10 additions & 10 deletions app/code/Magento/CatalogCustomerGraphQl/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
# See COPYING.txt for license details.

interface ProductInterface {
tier_prices: [ProductTierPrices] @deprecated(reason: "Use price_tiers for product tier price information.") @doc(description: "An array of ProductTierPrices objects.") @resolver(class: "Magento\\CatalogCustomerGraphQl\\Model\\Resolver\\TierPrices")
price_tiers: [TierPrice] @doc(description: "An array of TierPrice objects.") @resolver(class: "Magento\\CatalogCustomerGraphQl\\Model\\Resolver\\PriceTiers")
tier_prices: [ProductTierPrices] @deprecated(reason: "Use `price_tiers` for product tier price information.") @doc(description: "An array of ProductTierPrices objects.") @resolver(class: "Magento\\CatalogCustomerGraphQl\\Model\\Resolver\\TierPrices")
price_tiers: [TierPrice] @doc(description: "An array of `TierPrice` objects.") @resolver(class: "Magento\\CatalogCustomerGraphQl\\Model\\Resolver\\PriceTiers")
}

type ProductTierPrices @doc(description: "ProductTierPrices is deprecated and has been replaced by TierPrice. The ProductTierPrices object defines a tier price, which is a quantity discount offered to a specific customer group.") {
customer_group_id: String @deprecated(reason: "customer_group_id is not relevant for storefront.") @doc(description: "The ID of the customer group.")
qty: Float @deprecated(reason: "ProductTierPrices is deprecated, use TierPrice.quantity.") @doc(description: "The number of items that must be purchased to qualify for tier pricing.")
value: Float @deprecated(reason: "ProductTierPrices is deprecated. Use TierPrice.final_price") @doc(description: "The price of the fixed price item.")
percentage_value: Float @deprecated(reason: "ProductTierPrices is deprecated. Use TierPrice.discount.") @doc(description: "The percentage discount of the item.")
website_id: Float @deprecated(reason: "website_id is not relevant for storefront.") @doc(description: "The ID assigned to the website.")
type ProductTierPrices @doc(description: "Deprecated. Use `TierPrice` instead. Defines a tier price, which is a quantity discount offered to a specific customer group.") {
customer_group_id: String @deprecated(reason: "Not relevant for the storefront.") @doc(description: "The ID of the customer group.")
qty: Float @deprecated(reason: "Use `TierPrice.quantity` instead.") @doc(description: "The number of items that must be purchased to qualify for tier pricing.")
value: Float @deprecated(reason: "Use `TierPrice.final_price` instead.") @doc(description: "The price of the fixed price item.")
percentage_value: Float @deprecated(reason: "Use `TierPrice.discount` instead.") @doc(description: "The percentage discount of the item.")
website_id: Float @deprecated(reason: "Not relevant for the storefront.") @doc(description: "The ID assigned to the website.")
}


type TierPrice @doc(description: "A price based on the quantity purchased.") {
final_price: Money @doc(desription: "The price of the product at this tier.")
type TierPrice @doc(description: "Defines a price based on the quantity purchased.") {
final_price: Money @doc(description: "The price of the product at this tier.")
quantity: Float @doc(description: "The minimum number of items that must be purchased to qualify for this price tier.")
discount: ProductDiscount @doc(description: "The price discount that this tier represents.")
}
Loading

0 comments on commit 1918bc2

Please sign in to comment.