Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

133 строки
11 KiB

  1. # Copyright © Magento, Inc. All rights reserved.
  2. # See COPYING.txt for license details.
  3. type Query {
  4. wishlist: WishlistOutput @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistResolver") @deprecated(reason: "Moved under `Customer.wishlist`.") @doc(description: "Return the contents of a customer's wish list.") @cache(cacheable: false)
  5. }
  6. type Customer {
  7. wishlists(
  8. pageSize: Int = 20 @doc(description: "Specifies the maximum number of results to return at once. This attribute is optional."),
  9. currentPage: Int = 1 @doc(description: "Specifies which page of results to return. The default value is 1.")
  10. ): [Wishlist!]! @doc(description: "An array of wishlists. In Magento Open Source, customers are limited to one wish list. The number of wish lists is configurable for Adobe Commerce.") @resolver(class:"\\Magento\\WishlistGraphQl\\Model\\Resolver\\CustomerWishlists")
  11. wishlist: Wishlist! @deprecated(reason: "Use `Customer.wishlists` or `Customer.wishlist_v2` instead.") @resolver(class:"\\Magento\\WishlistGraphQl\\Model\\Resolver\\CustomerWishlistResolver") @doc(description: "Return a customer's wish lists.") @cache(cacheable: false)
  12. wishlist_v2(id: ID!): Wishlist @doc(description: "Retrieve the wish list identified by the unique ID for a `Wishlist` object.") @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistById")
  13. }
  14. type WishlistOutput @doc(description: "Deprecated: Use the `Wishlist` type instead.") {
  15. items: [WishlistItem] @deprecated(reason: "Use the `Wishlist.items` field instead.") @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistItemsResolver") @doc(description: "An array of items in the customer's wish list"),
  16. items_count: Int @deprecated(reason: "Use the `Wishlist.items_count` field instead.") @doc(description: "The number of items in the wish list."),
  17. name: String @deprecated(reason: "This field is related to Commerce functionality and is always `null` in Open Source.") @doc(description: "When multiple wish lists are enabled, the name the customer assigns to the wishlist."),
  18. sharing_code: String @deprecated(reason: "Use the `Wishlist.sharing_code` field instead.") @doc(description: "An encrypted code that links to the wish list."),
  19. updated_at: String @deprecated(reason: "Use the `Wishlist.updated_at` field instead.") @doc(description: "The time of the last modification to the wish list.")
  20. }
  21. type Wishlist @doc(description: "Contains a customer wish list.") {
  22. id: ID @doc(description: "The unique ID for a `Wishlist` object.")
  23. items: [WishlistItem] @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistItemsResolver") @deprecated(reason: "Use the `items_v2` field instead.")
  24. items_v2(
  25. currentPage: Int = 1,
  26. pageSize: Int = 20
  27. ): WishlistItems @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\WishlistItems") @doc(description: "An array of items in the customer's wish list.")
  28. items_count: Int @doc(description: "The number of items in the wish list.")
  29. sharing_code: String @doc(description: "An encrypted code that Magento uses to link to the wish list.")
  30. updated_at: String @doc(description: "The time of the last modification to the wish list.")
  31. }
  32. interface WishlistItemInterface @typeResolver(class: "Magento\\WishlistGraphQl\\Model\\Resolver\\Type\\WishlistItemType") @doc(description: "The interface for wish list items."){
  33. id: ID! @doc(description: "The unique ID for a `WishlistItemInterface` object.")
  34. quantity: Float! @doc(description: "The quantity of this wish list item.")
  35. description: String @doc(description: "The description of the item.")
  36. added_at: String! @doc(description: "The date and time the item was added to the wish list.")
  37. product: ProductInterface @doc(description: "Product details of the wish list item.") @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\ProductResolver")
  38. customizable_options: [SelectedCustomizableOption]! @resolver(class: "Magento\\WishlistGraphQl\\Model\\Resolver\\CustomizableOptions") @doc(description: "Custom options selected for the wish list item.")
  39. }
  40. type WishlistItems @doc(description: "Contains an array of items in a wish list.") {
  41. items: [WishlistItemInterface]! @doc(description: "A list of items in the wish list.")
  42. page_info: SearchResultPageInfo @doc(description: "Contains pagination metadata.")
  43. }
  44. type WishlistItem @doc(description: "Contains details about a wish list item.") {
  45. id: Int @doc(description: "The unique ID for a `WishlistItem` object.")
  46. qty: Float @doc(description: "The quantity of this wish list item"),
  47. description: String @doc(description: "The customer's comment about this item."),
  48. added_at: String @doc(description: "The time when the customer added the item to the wish list."),
  49. product: ProductInterface @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\ProductResolver") @doc(description: "Details about the wish list item.")
  50. }
  51. type Mutation {
  52. addProductsToWishlist(wishlistId: ID! @doc(description: "The ID of a wish list."), wishlistItems: [WishlistItemInput!]! @doc(description: "An array of products to add to the wish list.")): AddProductsToWishlistOutput @doc(description: "Add one or more products to the specified wish list. This mutation supports all product types.") @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\AddProductsToWishlist")
  53. removeProductsFromWishlist(wishlistId: ID! @doc(description: "The ID of a wish list."), wishlistItemsIds: [ID!]! @doc(description: "An array of item IDs representing products to be removed.")): RemoveProductsFromWishlistOutput @doc(description: "Remove one or more products from the specified wish list.") @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\RemoveProductsFromWishlist")
  54. updateProductsInWishlist(wishlistId: ID! @doc(description: "The ID of a wish list."), wishlistItems: [WishlistItemUpdateInput!]! @doc(description: "An array of items to be updated.")): UpdateProductsInWishlistOutput @doc(description: "Update one or more products in the specified wish list.") @resolver(class: "\\Magento\\WishlistGraphQl\\Model\\Resolver\\UpdateProductsInWishlist")
  55. addWishlistItemsToCart(
  56. wishlistId: ID!, @doc(description: "The unique ID of the wish list")
  57. wishlistItemIds: [ID!] @doc(description: "An array of IDs representing products to be added to the cart. If no IDs are specified, all items in the wishlist will be added to the cart")
  58. ): AddWishlistItemsToCartOutput @resolver(class: "Magento\\WishlistGraphQl\\Model\\Resolver\\Wishlist\\AddToCart") @doc(description: "Add items in the specified wishlist to the customer's cart.")
  59. }
  60. type AddWishlistItemsToCartOutput @doc(description: "Contains the resultant wish list and any error information.") {
  61. wishlist: Wishlist! @doc(description: "Contains the wish list with all items that were successfully added.")
  62. status: Boolean! @doc(description: "Indicates whether the attempt to add items to the customer's cart was successful.")
  63. add_wishlist_items_to_cart_user_errors: [WishlistCartUserInputError!]! @doc(description: "An array of errors encountered while adding products to the customer's cart.")
  64. }
  65. type WishlistCartUserInputError @doc(description: "Contains details about errors encountered when a customer added wish list items to the cart.") {
  66. message: String! @doc(description: "A localized error message.")
  67. code: WishlistCartUserInputErrorType! @doc(description: "An error code that describes the error encountered.")
  68. wishlistId: ID! @doc(description: "The unique ID of the `Wishlist` object containing an error.")
  69. wishlistItemId: ID! @doc(description: "The unique ID of the wish list item containing an error.")
  70. }
  71. enum WishlistCartUserInputErrorType @doc(description: "A list of possible error types.") {
  72. PRODUCT_NOT_FOUND
  73. NOT_SALABLE
  74. INSUFFICIENT_STOCK
  75. UNDEFINED
  76. }
  77. input WishlistItemInput @doc(description: "Defines the items to add to a wish list.") {
  78. sku: String! @doc(description: "The SKU of the product to add. For complex product types, specify the child product SKU.")
  79. quantity: Float! @doc(description: "The amount or number of items to add.")
  80. parent_sku: String @doc(description: "For complex product types, the SKU of the parent product.")
  81. selected_options: [ID!] @doc(description: "An array of strings corresponding to options the customer selected.")
  82. entered_options: [EnteredOptionInput!] @doc(description: "An array of options that the customer entered.")
  83. }
  84. type AddProductsToWishlistOutput @doc(description: "Contains the customer's wish list and any errors encountered.") {
  85. wishlist: Wishlist! @doc(description: "Contains the wish list with all items that were successfully added.")
  86. user_errors:[WishListUserInputError!]! @doc(description: "An array of errors encountered while adding products to a wish list.")
  87. }
  88. type RemoveProductsFromWishlistOutput @doc(description: "Contains the customer's wish list and any errors encountered.") {
  89. wishlist: Wishlist! @doc(description: "Contains the wish list with after items were successfully deleted.")
  90. user_errors:[WishListUserInputError!]! @doc(description:"An array of errors encountered while deleting products from a wish list.")
  91. }
  92. input WishlistItemUpdateInput @doc(description: "Defines updates to items in a wish list.") {
  93. wishlist_item_id: ID! @doc(description: "The unique ID for a `WishlistItemInterface` object.")
  94. quantity: Float @doc(description: "The new amount or number of this item.")
  95. description: String @doc(description: "Customer-entered comments about the item.")
  96. selected_options: [ID!] @doc(description: "An array of strings corresponding to options the customer selected.")
  97. entered_options: [EnteredOptionInput!] @doc(description: "An array of options that the customer entered.")
  98. }
  99. type UpdateProductsInWishlistOutput @doc(description: "Contains the customer's wish list and any errors encountered.") {
  100. wishlist: Wishlist! @doc(description: "Contains the wish list with all items that were successfully updated.")
  101. user_errors: [WishListUserInputError!]! @doc(description:"An array of errors encountered while updating products in a wish list.")
  102. }
  103. type WishListUserInputError @doc(description:"An error encountered while performing operations with WishList.") {
  104. message: String! @doc(description: "A localized error message.")
  105. code: WishListUserInputErrorType! @doc(description: "A wish list-specific error code.")
  106. }
  107. enum WishListUserInputErrorType @doc(description: "A list of possible error types.") {
  108. PRODUCT_NOT_FOUND
  109. UNDEFINED
  110. }
  111. type StoreConfig {
  112. magento_wishlist_general_is_enabled: String @doc(description: "Indicates whether wishlists are enabled (1) or disabled (0).")
  113. }