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

Assign cart to customer as part of login mutation #1765

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

bookernath
Copy link
Contributor

@bookernath bookernath commented Dec 16, 2024

What/Why?

Use the new enhancement to the login() mutation to assign the guest cart to the customer at the moment of login, which avoids an extra GQL request for this and simplifies the code.

A similar enhancement is coming soon to logout but will be a separate PR.

Testing

Preview deployment

Screen.Recording.2024-12-16.at.4.22.45.PM.mov

@bookernath bookernath requested a review from a team as a code owner December 16, 2024 22:16
Copy link

changeset-bot bot commented Dec 16, 2024

🦋 Changeset detected

Latest commit: 3108753

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 6:26pm
catalyst-soul ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 6:26pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) Dec 17, 2024 6:26pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Dec 17, 2024 6:26pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Dec 17, 2024 6:26pm

core/auth.ts Outdated Show resolved Hide resolved
Copy link
Member

@deini deini left a comment

Choose a reason for hiding this comment

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

nice

@bookernath bookernath force-pushed the cart-on-login-mutation branch from b0ce62a to 3108753 Compare December 17, 2024 18:24
@bookernath bookernath added this pull request to the merge queue Dec 17, 2024
Merged via the queue into main with commit 1c9b880 Dec 17, 2024
13 of 14 checks passed
@bookernath bookernath deleted the cart-on-login-mutation branch December 17, 2024 19:31
@github-actions github-actions bot mentioned this pull request Dec 17, 2024
Copy link
Contributor

⚡️🏠 Lighthouse report

Lighthouse ran against https://catalyst-latest-bqmt11nkf-bigcommerce-platform.vercel.app

🖥️ Desktop

We ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:

Category Score
🟠 Performance 79
🟢 Accessibility 96
🟢 Best practices 100
🟠 SEO 82

📱 Mobile

We ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:

Category Score
🟢 Performance 94
🟢 Accessibility 96
🟢 Best practices 100
🟠 SEO 85

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.

4 participants