question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Write a v1 to v2 migration guide, highlighting API changes such as cart.add

See original GitHub issue

Should we maintain the same argument definition from v1 for the cart.add method?

I was trying to pin-point why the request to the cart endpoint, adding a product to the cart, was not providing the variant in the body. This was because I was assuming the v2 cart.add still accepted a single argument as an object with id, quantity, and variant properties, however, now it’s not an object but individual parameters.

https://github.com/chec/commerce.js/blob/925909d61a9aa37bc4884673c82465e002d4f49a/src/features/cart.js#L81

v1 cart.add looks like this image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
robbieaverillcommented, Dec 7, 2019

We could definitely add a migration guide for v1-v2!

0reactions
ScopeyNZcommented, Dec 10, 2019

We have some very limited docs already: https://github.com/chec/commerce.js#upgrading

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate from Bid Manager API v1.1 to v2
Migrating from v1.1 to v2 requires updating your endpoint URLs to call v2, and updating your application to account for breaking changes. Update ......
Read more >
API v1 to API v2 migration guide - Developers
Here's a mapping of how v1 functionality maps to v2. All v1 endpoints are listed in the left column, and the equivalent v2...
Read more >
Migrating to Discovery v2
Migrating from Discovery v1 to v2 is a multistep process that you can do ... Some steps require you to make programmatic changes...
Read more >
Amazon Lex V1 to V2 migration guide
Use this guide to learn about the improvements in the Amazon Lex V2 API as you migrate bots. You migrate a bot using...
Read more >
Call Control API V2 Migration Guide
This guide highlights the main changes to be aware of when migrating your Call Control application from API v1 to API v2. Call...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found