-
Notifications
You must be signed in to change notification settings - Fork 5.5k
feat: Add Shopify Get Order action #14858
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
feat: Add Shopify Get Order action #14858
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
|
@GovardhaneNitin is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe pull request introduces two new modules for handling Shopify order data. The first module, Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
|
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Outside diff range and nitpick comments (2)
components/shopify/actions/get-order/common.mjs (1)
27-37: Add validation for orderFieldsThe
orderFieldsprop accepts any string array without validating if the fields actually exist in the Shopify API.Consider adding an enum of valid fields or validation logic:
orderFields: { type: "string[]", label: "Order Fields", + options: [ + "id", + "order_number", + "total_price", + "created_at", + "updated_at", + "fulfillment_status", + "financial_status", + "customer", + "line_items", + "shipping_address", + "billing_address", + ], description: toSingleLineString(` Select which fields to include in the response. If none selected, returns all available fields. See Shopify Order API documentation for available fields: https://shopify.dev/api/admin-graphql/2024-10/queries/order `), optional: true, },components/shopify/actions/get-order/get-order.mjs (1)
20-38: Consider rate limiting and sensitive data handlingWhen dealing with order data through Shopify's API:
- Consider implementing rate limiting to avoid API throttling
- Be mindful of handling sensitive customer information in logs
Consider adding rate limiting middleware or using a rate limiter from the app instance. Also, ensure sensitive data is not logged in the
$summary.async run({ $ }) { try { + // Redact orderId in logs + const redactedOrderId = this.orderId.substring(0, 4) + '...'; const response = await this.app.resourceAction( "order", "get", params, this.orderId, ); const formattedOrder = this.formatOrderData(response.result); - $.export("$summary", `Retrieved order ${this.orderId}`); + $.export("$summary", `Retrieved order ${redactedOrderId}`); return formattedOrder; } },🧰 Tools
🪛 eslint
[error] 32-33: Missing trailing comma.
(comma-dangle)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
components/shopify/actions/get-order/common.mjs(1 hunks)components/shopify/actions/get-order/get-order.mjs(1 hunks)
🧰 Additional context used
🪛 eslint
components/shopify/actions/get-order/get-order.mjs
[error] 32-33: Missing trailing comma.
(comma-dangle)
🔇 Additional comments (1)
components/shopify/actions/get-order/get-order.mjs (1)
1-19: LGTM! Well-structured component setup
Good use of common configuration spreading and proper prop definitions.
Description
Added new Shopify Get Order action to retrieve order details using the Admin GraphQL API.
Changes
shopify-get-orderTesting
Summary by CodeRabbit