-
Notifications
You must be signed in to change notification settings - Fork 111
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
Theme Rest Resource doesn't have fromData
applied automatically
#1086
Comments
I have found the same behaviour with Using this snippet: const { admin, session } = await authenticate.admin(request);
const orderData = {
email: "[email protected]",
fulfillment_status: "fulfilled",
fulfillments: [
{
location_id: 24826418,
},
],
line_items: [
{
variant_id: 447654529,
quantity: 1,
},
],
};
const order = new admin.rest.resources.Order({
session,
fromData: orderData,
});
await order.save({ update: true });
Expected BehaviourA new order will be created without error. Actual BehaviourA 400 error is thrown: errors: { order: 'Required parameter missing or invalid' } |
Thank you for reporting this @david-w-shopify, we'll take a look. |
We're labeling this issue as stale because there hasn't been any activity on it for 60 days. While the issue will stay open and we hope to resolve it, this helps us prioritize community requests. You can add a comment to remove the label if it's still relevant, and we can re-evaluate it. |
I got the same thing with Webhook. Logging in the constructor of Base showed me a correctly updated 'this' from 'fromData' right before exiting. Commenting the field block at the end of webhook.mjs made it work properly. And that is the length of my analysis on this. Note fromData was working for me a few months ago. |
Issue summary
Before opening this issue, I have:
@shopify/shopify-api
package and version: 11.0.1@shopify/shopify-app-remix
package and version: 3.0.1Theme
rest resource no longer hasfromData
applied to it. I suspect this is happening with other rest resources too, but it's only impacted me with themes.Using this snippet
Expected behavior
Using the above snippet I'd expect this to be logged:
Actual behavior
I get this
Steps to reproduce the problem
I've created this repo to reproduce the issue: https://github.com/david-w-shopify/shopify-rest-resource-issue.
app/routes/app.tsx
the reproduction repopnpm dev
and install the app on a test storetheme
variable being loggedThe text was updated successfully, but these errors were encountered: