Discuss all the new features introduced with the new product model in GraphQL.
Hi, how would you suggest to handle bulk mutation for product/variant updates that involves new media?
I'm aware of this discussion, but the solution suggested would not be ideal in this use case.
How do we accomplish the same thing without having to do reprocessing on productSet mutation file?
Thanks in advanced.
Hello!
In step 2 of your solution, you mention preparing productSet then reprocessing it a second time with the resulting information from fileCreate. Just to clarify what you are referring to as processing here, are you executing the productSet call twice (once without the media attached, second with the media attached) or speaking towards iterating through the data structure you have twice (once to setup the structure to send without file_ids, second to add the file_ids?). If it's the former, you should only require a call to productSet once when the files have been uploaded to Shopify.
In general, the approach recommended breaks up product syncing into two phases
1. "Upsert" files into Shopify (using fileCreate w/ duplicate
2. Sync products using productSet
There's a bit more book keeping here between the two processes though (tracking product ID <-> file ID associations) prior to executing productSet.
To learn more visit the Shopify Help Center or the Community Blog.
To clarify step 2, i'm referring to the latter (not calling any APIs yet). It used to be that we can do this in one shot, create a mutation file with media, products and variants for bulk mutation, now we need to split the process, and do some reparsing on the file created locally.
I confirm, it gets complicated
HI folks,
Wanted to let you know we have added ability to create a file when calling productSet
https://shopify.dev/docs/api/admin-graphql/2024-10/input-objects/ProductSetInput#field-files
Hi AsafGitai
This is very good news. Thank you. 😉
HI folks,
Wanted to let you know we have added ability to create files when calling productSet
https://shopify.dev/docs/api/admin-graphql/2024-10/input-objects/ProductSetInput#field-files