Skip to content

Update delivery customizations examples to use renamed targets #625

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

Open
wants to merge 1 commit into
base: update-function-templates-2025-07
Choose a base branch
from

Conversation

maximus1108
Copy link

@maximus1108 maximus1108 commented May 9, 2025

Part of the ongoing project to rationalise the function API

gsd#44156 | doc | style guide | slack

This PR updates the Delivery Customizations templates and examples

Specifically:

  • Pulled the latest schema (shopify app function schema)
  • Updated the sample code:
    • Target name: purchase.delivery-customization.run -> cart.delivery-options.transform.run
    • Target type: FunctionRunResult -> CartDeliveryOptionsTransformRunResult
    • operation: RenameOperation -> DeliveryOptionRenameOperation
  • Bumped the version to 2025-07

Testing the changes:

  • yarn test is JS dirs
  • cargo test in Rust dirs

JS example:
image

Rust eample
image

@@ -16,7 +16,8 @@
"shopify": "shopify",
"prisma": "prisma",
"graphql-codegen": "graphql-codegen",
"vite": "vite"
"vite": "vite",
"test": "vitest"
Copy link
Author

Choose a reason for hiding this comment

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

Added to simplify running the tests

Copy link

@hamishmorgan hamishmorgan left a comment

Choose a reason for hiding this comment

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

You've missed the operation attribute name change in a few places. I think you need to update the checkout/wasm/schema.graphql file too... though not entirely sure what that template is for.

Otherwise looks good

@maximus1108 maximus1108 force-pushed the maxp/delivery-customizations-2025-07 branch 2 times, most recently from 94b53fa to c1f705e Compare May 9, 2025 12:40
@maximus1108 maximus1108 requested a review from hamishmorgan May 9, 2025 12:40
@maximus1108 maximus1108 force-pushed the maxp/delivery-customizations-2025-07 branch from c1f705e to 418d310 Compare May 9, 2025 12:40
Copy link
Member

@tjoyal tjoyal left a comment

Choose a reason for hiding this comment

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

What I see here looks good.

Approving, but either here or as a followup PR we'll need to update the export name and GraphQL schema file name as per #623

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.

3 participants