Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

GraphQL: Add uid for various products #7416

Merged
merged 14 commits into from
Aug 22, 2020
Merged

Conversation

keharper
Copy link
Contributor

@keharper keharper commented Jun 16, 2020

Purpose of this pull request

This pull request (PR) adds the uid attribute to the GiftCardAmounts object, per https://github.com/magento/partners-magento2ee/pull/263

CE PR that added uid attributes to several product types:
magento/magento2#28210

Affected DevDocs pages

Links to Magento source code

  • ...

@keharper keharper added Internal Dev Differentiates work between community and Magento staff Technical Updates to the code or processes that alter the technical content of the doc Community Docs impacted by community code contribution 2.4.1 labels Jun 16, 2020
@keharper keharper self-assigned this Jun 16, 2020
@keharper keharper changed the title GraphQL: Add id_v2 for gift cards GraphQL: Add uid for gift cards Jul 27, 2020
@keharper keharper changed the title GraphQL: Add uid for gift cards GraphQL: Add uid for various products Aug 19, 2020
@keharper keharper requested a review from rogyar August 19, 2020 05:02
@keharper
Copy link
Contributor Author

I broke symlinks in this PR, making it appear as if all the content is new. My changes are limited to:

  • Removing the redirect statement in the frontmatter
  • Adding uid attributes in the appropriate tables
  • Updating the examples to include the uid attribute. The output was copy and pasted--it's not fudged.

Note: I didn't previously have an example showing a customizable option, and so I didn't create one to show the uid attribute.

@keharper keharper requested a review from erikmarr August 19, 2020 05:03
@rogyar
Copy link
Contributor

rogyar commented Aug 19, 2020

Hi @keharper. I believe it's not a big deal since it's just an example. But the uid is not the same for different option values (same as id). We may change some part of the string randomly to make the value different for all options.

https://github.com/magento/devdocs/pull/7416/files#diff-445a68c46a7c2e44ad0317182ba7c305R156

@rogyar rogyar self-assigned this Aug 19, 2020
@keharper
Copy link
Contributor Author

@rogyar Is there anything I need to change with respect to the uid fields?

Also, I forgot to mention that I deliberately did not document the GiftCardCartItem data type in this PR. I need to create a new section in the left navigation of devdocs about interfaces and their implementations. I'll do that all at once in a separate PR.

Copy link
Contributor

@erikmarr erikmarr left a comment

Choose a reason for hiding this comment

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

Looks good. I noticed you spell out SKU in certain attribute lists but not in others, such as BundleProduct object.

@rogyar
Copy link
Contributor

rogyar commented Aug 20, 2020

Hi @keharper. I would suggest randomizing uid values for different option values so we have the uid values different

"options": [
                {
                  "id": 1,
                  "uid": "YnVuZGxlLzEvMS8x",
                 ...
                },
                {
                  "id": 2,
                  "uid": "YnVuZGxlLzEuiBy7",
                  ...
                },
                {
                  "id": 3,
                  "uid": "YnVuZGRlLzbuiBym",
                  ...
                }
              ]

Something like that. Here's the link to the mentioned example. Sorry, I cannot use inline suggestions for this PR for some reason.

@keharper
Copy link
Contributor Author

@rogyar The uid values are different. The first 10 characters all start with YnVuZGxlLz and end with 8x.

Statis ball uids. Only the character before the 8 differs
"uid": "YnVuZGxlLzEvMi8x",
"uid": "YnVuZGxlLzEvMS8x",
"uid": "YnVuZGxlLzEvMy8x",

Yoga brick uid
"uid": "YnVuZGxlLzIvNC8x",

Straps uids. Again, only the character before the 8 differs
"uid": "YnVuZGxlLzMvNi8x",
"uid": "YnVuZGxlLzMvNS8x",
"uid": "YnVuZGxlLzMvNy8x",

Roller uid
"uid": "YnVuZGxlLzQvOC8x",

@rogyar
Copy link
Contributor

rogyar commented Aug 21, 2020

Hi @keharper. My bad. They look very similar. No suggestions from my end then. Everything looks good.

Thank you.

@keharper
Copy link
Contributor Author

running tests

@keharper keharper merged commit 1c88148 into 2.4.1-develop Aug 22, 2020
@ghost
Copy link

ghost commented Aug 22, 2020

Hi @keharper, 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.

@keharper keharper deleted the kh_graphql-giftcard-idv2 branch August 22, 2020 19:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2.4.1 Community Docs impacted by community code contribution Internal Dev Differentiates work between community and Magento staff Technical Updates to the code or processes that alter the technical content of the doc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants