-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
32574 GraphQL: move items from cart to gift registry #8929
32574 GraphQL: move items from cart to gift registry #8929
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition!
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`code` | GiftRegistryItemsUserErrorType! | A gift registry-specific error code. Possible values include `OUT_OF_STOCK`, `NOT_FOUND` and `UNDEFINED` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`code` | GiftRegistryItemsUserErrorType! | A gift registry-specific error code. Possible values include `OUT_OF_STOCK`, `NOT_FOUND` and `UNDEFINED` | |
`code` | GiftRegistryItemsUserErrorType! | A gift registry specific error code. Possible values include `OUT_OF_STOCK`, `NOT_FOUND` and `UNDEFINED` |
`message` | String! | A localized error message | ||
`product_uid` | ID | The unique ID of the product containing an error | ||
`gift_registry_item_uid` | ID | The unique ID of the gift registry item containing an error | ||
`gift_registry_uid` | ID | The unique ID of the `Gift registry` object containing an error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistent with page below
`gift_registry_uid` | ID | The unique ID of the `Gift registry` object containing an error | |
`gift_registry_uid` | ID | The unique ID of the `GiftRegistry` object containing an error |
|
||
## Output attributes | ||
|
||
The `MoveCartItemsToGiftRegistryOutput` object can contain the following attributes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `MoveCartItemsToGiftRegistryOutput` object can contain the following attributes. | |
The `MoveCartItemsToGiftRegistryOutput` object can contain the following attributes: |
|
||
## Input attributes | ||
|
||
The `moveCartItemsToGiftRegistry` mutation requires the following input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `moveCartItemsToGiftRegistry` mutation requires the following input. | |
The `moveCartItemsToGiftRegistry` mutation requires the following input: |
Hi @BarnyShergold, |
@khrystynastolbova We need to account for the new interfaces somehow, but I'm not sure how to do it while just looking at the schema. They're too small to warrant their own topics. I'll get back to you in a few days, after I've had a chance to test the new mutation. |
Hi @keharper! I see I missed the new interfaces. They are too small but other mutations will probably implement these interfaces. So maybe it would be better to move them to separate files? |
## Output attributes | ||
|
||
The `MoveCartItemsToGiftRegistryOutput` object can contain the following attributes: | ||
|
||
Attribute | Data Type | Description | ||
--- | --- | --- | ||
`gift_registry` | [GiftRegistry!](#GiftRegistry) | The gift registry containing the moved items | ||
`status` | Boolean! | Indicates whether the attempt to move the cart items to the gift registry was successful | ||
`user_errors` | [[GiftRegistryItemsUserError!](#GiftRegistryItemsUserError)] | An array of errors encountered while moving items from the cart to the gift registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Output attributes | |
The `MoveCartItemsToGiftRegistryOutput` object can contain the following attributes: | |
Attribute | Data Type | Description | |
--- | --- | --- | |
`gift_registry` | [GiftRegistry!](#GiftRegistry) | The gift registry containing the moved items | |
`status` | Boolean! | Indicates whether the attempt to move the cart items to the gift registry was successful | |
`user_errors` | [[GiftRegistryItemsUserError!](#GiftRegistryItemsUserError)] | An array of errors encountered while moving items from the cart to the gift registry | |
### MoveCartItemsToGiftRegistryOutput attributes {#MoveCartItemsToGiftRegistryOutput} | |
The `MoveCartItemsToGiftRegistryOutput` object implements [`GiftRegistryOutputInterface`](#GiftRegistryOutputInterface) and [`GiftRegistryItemUserErrorInterface`](#GiftRegistryItemUserErrorInterface). | |
### GiftRegistryOutputInterface attributes {#GiftRegistryOutputInterface} | |
{% include graphql/gift-registry-output-interface.md %} | |
### GiftRegistryItemUserErrorInterface attributes {#GiftRegistryItemUserErrorInterface} | |
{% include graphql/gift-registry-item-user-error-interface.md %} |
@khrystynastolbova This PR looks like it's complete technically. Please add the following lines to the header section of
|
…hub.com:khrystynastolbova/devdocs into 32574_GQL_move_items_from_cart_to_gift_registry
Thanks, @keharper. Done. |
@magento import code to magento-devdocs/devdocs |
@keharper the branch with code successfully imported into |
Hi @khrystynastolbova, thank you for your contribution! |
Purpose of this pull request
This pull request (PR) adds the moveCartItemsToGiftRegistry mutation.
Affected DevDocs pages
Links to Magento source code
magento/partners-magento2ee/pull/540
Issue magento/magento2#32574
whatsnew
Added the moveCartItemsToGiftRegistry mutation.