What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How to pass input variable into bulkOperationRunMutation query?

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