Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.
Solved

How to pass input variable into bulkOperationRunMutation query?

hansenc23
Visitor
2 1 0

I'm trying to run a bulk mutation to update product tags. Below is a screenshot of my code in NodeJS and you can see the error I got from the console. I'm wondering how am I supposed to pass in $input into the mutation query?

 

Correct me if I'm wrong, I thought "stagedUploadPath" would be the input to the bulk mutation? But why do I still need to pass in $input: ProductInput! ? 

 

I was following this https://shopify.dev/api/usage/bulk-operations/imports , however, it isn't very clear on how to pass in $input variable and there wasn't any example code that I can refer to. Pls help.

 

bulk-mutation.png

Accepted Solution (1)

hansenc23
Visitor
2 1 0

This is an accepted solution.

All good now, turns out my product objects inside the jsonl file was in an incorrect format

View solution in original post

Reply 1 (1)

hansenc23
Visitor
2 1 0

This is an accepted solution.

All good now, turns out my product objects inside the jsonl file was in an incorrect format