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

Updating to 2025-01 SFAPI #2715

Merged
merged 3 commits into from
Jan 23, 2025
Merged

Updating to 2025-01 SFAPI #2715

merged 3 commits into from
Jan 23, 2025

Conversation

rbshop
Copy link
Contributor

@rbshop rbshop commented Jan 20, 2025

WHY are these changes introduced?

Fixes #0000

WHAT is this pull request doing?

HOW to test your changes?

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Copy link
Contributor

shopify bot commented Jan 20, 2025

Oxygen deployed a preview of your feature/2025-01-sfapi-update branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment January 23, 2025 7:54 PM
classic-remix ✅ Successful (Logs) Preview deployment Inspect deployment January 23, 2025 7:54 PM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment January 23, 2025 7:54 PM
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment January 23, 2025 7:54 PM
metaobjects ✅ Successful (Logs) Preview deployment Inspect deployment January 23, 2025 7:54 PM

Learn more about Hydrogen's GitHub integration.

@wizardlyhel
Copy link
Contributor

SFAPI update that requires us to update our code as well:

New cart mutation: cartGiftCardCodesRemove

Before SFAPI update: we just had to pass in an empty [] to the cartGiftCardCodesUpdate mutation in order to remove gift card codes from a cart.

After SFAPI update: we should use the cartGiftCardCodesRemove mutation to remove gift card codes.

Affected files:

  • createCartHandler should export a new method that can be invoked named removeGiftCardCodes
  • New export cartGiftCardCodesRemoveDefault should handles remove gift card mutation operation
  • CartFrom should be updated to handle CartForm.ACTIONS.GiftCardCodesRemove
  • Skeleton template routes/cart.tsx needs update to handle new mutation
  • Skeleton template components/CartSummary.tsx gift card form needs update to handle the new way to remove gift card codes

New cart delivery mutations

While we don't have skeleton template example usage for these new mutations, they should still be available from createCartHandler and CartForm

@wizardlyhel wizardlyhel marked this pull request as ready for review January 23, 2025 19:08

This comment has been minimized.

@wizardlyhel wizardlyhel changed the title [WIP] Updating to 2025-01 SFAPI Updating to 2025-01 SFAPI Jan 23, 2025
@wizardlyhel wizardlyhel merged commit 064de13 into main Jan 23, 2025
12 checks passed
@wizardlyhel wizardlyhel deleted the feature/2025-01-sfapi-update branch January 23, 2025 21:34
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.

2 participants