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

refactor: cart token param name consistent to cartToken #5820

Conversation

trojanh
Copy link
Contributor

@trojanh trojanh commented Nov 21, 2019

Resolves #4642
Impact: minor
Type: refactor

Issue

Cart tokens currently have three names i.e token, cartToken and anonymousAccessToken, need to rename all of them to same consistent name.

Solution

Update token or anonymousAccessToken params name to cartToken to make it consistent

Breaking Changes

Clients (such as those based on the example storefront codebase) that call cart-related mutations will need to pass cartToken param instead of token or anonymousAccessToken

Testing

  1. Test the following mutations:
    updateCartItemsQuantity
    setEmailOnAnonymousCart
    removeCartItems
    reconcileCarts
    addCartItems

  2. Test following query
    anonymousCartByCartId

Signed-off-by: trojanh <rajan.tiwari@kiprosh.com>
… into refactor-4642-make-cartToken-consistent
Signed-off-by: trojanh <rajan.tiwari@kiprosh.com>
Signed-off-by: trojanh <rajan.tiwari@kiprosh.com>
Signed-off-by: trojanh <rajan.tiwari@kiprosh.com>
Signed-off-by: trojanh <rajan.tiwari@kiprosh.com>
…nymousCartByCartId query

Signed-off-by: trojanh <rajan.tiwari@kiprosh.com>
Signed-off-by: trojanh <rajan.tiwari@kiprosh.com>
Signed-off-by: trojanh <rajan.tiwari@kiprosh.com>
@trojanh trojanh force-pushed the refactor-4642-make-cartToken-consistent branch from 27a96b8 to 2f0d3df Compare November 21, 2019 12:27
@trojanh trojanh changed the title Refactor cart token param name consistent to cartToken refactor: cart token param name consistent to cartToken Nov 21, 2019
@spencern spencern requested a review from aldeed November 21, 2019 16:32
@aldeed
Copy link
Contributor

aldeed commented Nov 21, 2019

@trojanh These changes look good but I don't want to merge this until the release-v3.0.0 branch of example-storefront also has a PR submitted updating the mutations and state logic there. (The purpose of this issue was to simplify some things in the example storefront.) If you're not familiar with storefront codebase, @willopez may be able to help or do the storefront PR.

@trojanh
Copy link
Contributor Author

trojanh commented Nov 22, 2019

Thanks, @aldeed I would like do the storefront changes as well. I will definitely take @willopez 's help if needed.

@trojanh
Copy link
Contributor Author

trojanh commented Nov 23, 2019

I have made the changes for front-end,
reactioncommerce/example-storefront#616

@willopez willopez self-requested a review December 6, 2019 19:11
@willopez
Copy link
Member

willopez commented Dec 6, 2019

I reviewed and merged the related PR on the storefront reactioncommerce/example-storefront#616 this one is good to go too. Thanks again @trojanh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants