Skip to content
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

Conversation

khrystynastolbova
Copy link
Contributor

@khrystynastolbova khrystynastolbova commented May 10, 2021

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.

@dobooth dobooth requested a review from keharper May 10, 2021 18:38
Copy link
Contributor

@BarnyShergold BarnyShergold left a 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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistent with page below

Suggested change
`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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `moveCartItemsToGiftRegistry` mutation requires the following input.
The `moveCartItemsToGiftRegistry` mutation requires the following input:

@khrystynastolbova
Copy link
Contributor Author

Hi @BarnyShergold,
Thanks for your review and suggestions. The mentioned changes are done.

@keharper
Copy link
Contributor

@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.

@khrystynastolbova
Copy link
Contributor Author

@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?

Comment on lines +103 to +111
## 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
Copy link
Contributor Author

@khrystynastolbova khrystynastolbova May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 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 %}

@keharper
Copy link
Contributor

keharper commented May 24, 2021

@khrystynastolbova This PR looks like it's complete technically. Please add the following lines to the header section of move-cart-items-to-gift-registry.md.

contributor_name: Atwix
contributor_link: https://www.atwix.com/

…hub.com:khrystynastolbova/devdocs into 32574_GQL_move_items_from_cart_to_gift_registry
@khrystynastolbova
Copy link
Contributor Author

khrystynastolbova commented May 25, 2021

@khrystynastolbova This PR looks like it's complete technically. Please add the following lines to the header section of move-cart-items-to-gift-registry.md.

contributor_name: Atwix
contributor_link: https://www.atwix.com/

Thanks, @keharper. Done.

@keharper
Copy link
Contributor

@magento import code to magento-devdocs/devdocs

@magento-engcom-team
Copy link

@keharper the branch with code successfully imported intomagento-devdocs/devdocs repository. Branch name: imported-magento-devdocs-8929.

@magento-cicd2 magento-cicd2 merged commit 00a0600 into magento:2.4.3-develop May 25, 2021
@ghost
Copy link

ghost commented May 25, 2021

Hi @khrystynastolbova, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.4.3 New Topic A major update published as an entirely new document Partner: Atwix partners-contribution PR created by Magento partner Progress: done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants