Skip to content

Add Cancel Fulfillment action for Shopify#21189

Open
Kanchanbasnet wants to merge 2 commits into
PipedreamHQ:masterfrom
Kanchanbasnet:add-shopify-fulfillment-cancel
Open

Add Cancel Fulfillment action for Shopify#21189
Kanchanbasnet wants to merge 2 commits into
PipedreamHQ:masterfrom
Kanchanbasnet:add-shopify-fulfillment-cancel

Conversation

@Kanchanbasnet

@Kanchanbasnet Kanchanbasnet commented Jun 17, 2026

Copy link
Copy Markdown

Adds a new "Cancel Fulfillment" action for the Shopify component, implementing the fulfillmentCancel GraphQL mutation.

Closes part of #21188 (fulfillmentCancel)

Changes

  • Added FULFILLMENT_CANCEL mutation to common/mutations.mjs
  • Added cancelFulfillment method to shopify.app.mjs
  • Added new action fulfillment-cancel that lets users cancel an existing fulfillment by ID

Testing

I was unable to test against a live Shopify store, as I don't currently have API credentials for one. The mutation syntax has been validated against the GraphQL spec, and the code follows the existing patterns used in get-fulfillment.mjs and delete-webhook. Happy to address any issues found in review.

API documentation reference: https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentCancel

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Cancel Shopify fulfillments: Added a new action to cancel existing fulfillments by fulfillment ID (optionally passing order context), with user error handling and a returned cancellation result.
  • Enhancements

    • Added the underlying GraphQL support and exposed a new app method for fulfillment cancellation.
  • Chores

    • Updated the Shopify package to version 0.10.0.

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Jun 17, 2026 8:52pm

Request Review

@pipedream-component-development

Copy link
Copy Markdown
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@pipedream-component-development

Copy link
Copy Markdown
Collaborator

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 816fd748-5a7d-4509-8315-3debbff852e5

📥 Commits

Reviewing files that changed from the base of the PR and between b1f22d5 and 50fdf6b.

📒 Files selected for processing (2)
  • components/shopify/actions/fulfillment-cancel/fulfillment-cancel.mjs
  • components/shopify/package.json

📝 Walkthrough

Walkthrough

A new shopify-cancel-fulfillment action is added. A FULFILLMENT_CANCEL GraphQL mutation constant is defined in mutations.mjs and exported. A cancelFulfillment(variables) method is added to shopify.app.mjs. The action wires these together with optional orderId and required fulfillmentId props, throws on userErrors, and returns the cancelled fulfillment. Package version is bumped to 0.10.0.

Changes

Shopify Cancel Fulfillment Action

Layer / File(s) Summary
GraphQL mutation and app method
components/shopify/common/mutations.mjs, components/shopify/shopify.app.mjs
Adds the FULFILLMENT_CANCEL GraphQL mutation string (returning fulfillment id/status and userErrors), exports it from the mutations map, and adds cancelFulfillment(variables) to the app using _makeGraphQlRequest.
Action definition, execution, and release
components/shopify/actions/fulfillment-cancel/fulfillment-cancel.mjs, components/shopify/package.json
Defines the shopify-cancel-fulfillment action with destructive annotation, optional orderId and required fulfillmentId props, calls cancelFulfillment, throws on userErrors, sets $summary, returns the cancelled fulfillment payload, and bumps package version from 0.9.0 to 0.10.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description covers the main changes and includes context, but the checklist items required by the template are not explicitly addressed or checked off. Address the template checklist items: confirm that component versions were updated to 0.0.1 if new, verify the package.json version was updated (appears to be 0.10.0), and confirm the app is already integrated and CodeRabbit comments have been addressed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately summarizes the main change: adding a new Cancel Fulfillment action for Shopify, which is clearly reflected in the code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@components/shopify/actions/fulfillment-cancel/fulfillment-cancel.mjs`:
- Line 7: The app package version in components/shopify/package.json must be
bumped to accommodate the new component starting at version 0.0.1. Update the
version field in the shopify package.json from 0.9.0 to 0.9.1 (bump the patch
version by at least one increment) to align with the new component version being
introduced in this PR.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 308e6c50-efda-4407-91a8-7d668d2fee74

📥 Commits

Reviewing files that changed from the base of the PR and between 0d06825 and b1f22d5.

📒 Files selected for processing (3)
  • components/shopify/actions/fulfillment-cancel/fulfillment-cancel.mjs
  • components/shopify/common/mutations.mjs
  • components/shopify/shopify.app.mjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

User submitted Submitted by a user

Projects

Status: Ready for PR Review

Development

Successfully merging this pull request may close these issues.

4 participants