Skip to content

Commit b1159bf

Browse files
author
Prabhu Ram
committed
- Fixed/ Removed dependencies in schema between QuoteGQL, SalesGQL and WishlistGQL
1 parent f6cfcff commit b1159bf

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

app/code/Magento/QuoteGraphQl/etc/schema.graphqls

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,18 +373,18 @@ type Order {
373373
order_id: String @deprecated(reason: "The order_id field is deprecated, use order_number instead.")
374374
}
375375

376-
type CheckoutUserInputError @doc(description:"An error encountered while adding an item to the the cart.") {
376+
type CartUserInputError @doc(description:"An error encountered while adding an item to the the cart.") {
377377
message: String! @doc(description: "A localized error message")
378378
path: [String]! @doc(description: "Path to the input field that caused an error. See the GraphQL specification about path errors for details: http://spec.graphql.org/draft/#sec-Errors")
379-
code: CheckoutUserInputErrorCodes! @doc(description: "Checkout-specific error code")
379+
code: CartUserInputErrorType! @doc(description: "Checkout-specific error code")
380380
}
381381

382382
type AddProductsToCartOutput {
383383
cart: Cart! @doc(description: "The cart after products have been added")
384-
userInputErrors:[CheckoutUserInputError]! @doc(description: "An error encountered while adding an item to the cart.")
384+
userInputErrors:[CartUserInputError]! @doc(description: "An error encountered while adding an item to the cart.")
385385
}
386386

387-
enum CheckoutUserInputErrorCodes {
387+
enum CartUserInputErrorType {
388388
PRODUCT_NOT_FOUND
389389
NOT_SALABLE
390390
INSUFFICIENT_STOCK

app/code/Magento/WishlistGraphQl/etc/schema.graphqls

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ input WishlistItemInput @doc(description: "Defines the items to add to a wish li
4949

5050
type AddProductsToWishlistOutput @doc(description: "Contains the customer's wish list and any errors encountered") {
5151
wishlist: Wishlist! @doc(description: "Contains the wish list with all items that were successfully added")
52-
userInputErrors:[CheckoutUserInputError]! @doc(description: "An array of errors encountered while adding products to a wish list")
52+
userInputErrors:[WishListUserInputError]! @doc(description: "An array of errors encountered while adding products to a wish list")
5353
}
5454

5555
type RemoveProductsFromWishlistOutput @doc(description: "Contains the customer's wish list and any errors encountered") {
5656
wishlist: Wishlist! @doc(description: "Contains the wish list with after items were successfully deleted")
57-
userInputErrors:[CheckoutUserInputError]! @doc(description:"An array of errors encountered while deleting products from a wish list")
57+
userInputErrors:[WishListUserInputError]! @doc(description:"An array of errors encountered while deleting products from a wish list")
5858
}
5959

6060
input WishlistItemUpdateInput @doc(description: "Defines updates to items in a wish list") {
@@ -67,5 +67,16 @@ input WishlistItemUpdateInput @doc(description: "Defines updates to items in a w
6767

6868
type UpdateProductsInWishlistOutput @doc(description: "Contains the customer's wish list and any errors encountered") {
6969
wishlist: Wishlist! @doc(description: "Contains the wish list with all items that were successfully updated")
70-
userInputErrors:[CheckoutUserInputError]! @doc(description:"An array of errors encountered while updating products in a wish list")
70+
userInputErrors:[WishListUserInputError]! @doc(description:"An array of errors encountered while updating products in a wish list")
71+
}
72+
73+
type WishListUserInputError @doc(description:"An error encountered while performing operations with WishList.") {
74+
message: String! @doc(description: "A localized error message")
75+
path: [String]! @doc(description: "Path to the input field that caused an error. See the GraphQL specification about path errors for details: http://spec.graphql.org/draft/#sec-Errors")
76+
code: WishListUserInputErrorType! @doc(description: "Wishlist-specific error code")
77+
}
78+
79+
enum WishListUserInputErrorType {
80+
PRODUCT_NOT_FOUND
81+
UNDEFINED
7182
}

0 commit comments

Comments
 (0)