Missing deliveryProfile on productVariantsBulkCreate

Am I right that deliveryProfile is missing on productVariantsBulkCreate/Update but it exists on productVariantCreate/Update

My goal is to create/update a product and at the same time add to a delivery profile. Looking at deliveryProfileUpdate that looks to be an update, rather than an append (which doesn’t seem scaleable when I only want to add one product to a profile)

Thanks
Grant

Hi Grant,

You’re correct that the deliveryProfile field is not present in the productVariantsBulkCreate or productVariantsBulkUpdate mutations. However, it is available in the productVariantCreate and productVariantUpdate mutations. This means that when using bulk operations, you cannot directly associate a variant with a delivery profile.

To achieve your goal of creating or updating a product and associating it with a delivery profile, you have a couple of options:

  1. Use productVariantCreate or productVariantUpdate Mutations: These mutations allow you to specify the deliveryProfile field directly. However, they are not bulk operations, so they may not scale well for large numbers of variants.

  2. Use Bulk Operations and a Separate Update for Delivery Profiles:

  • First, use productVariantsBulkCreate or productVariantsBulkUpdate to create or update the variants.
  • Then, use the deliveryProfileUpdate mutation to associate the variants with the desired delivery profile. Note that this mutation updates the entire delivery profile, so you would need to include all existing associations along with the new ones.

Unfortunately, there isn’t a direct “append” operation for delivery profiles, so you would need to manage the full list of associations when updating a delivery profile. This limitation can make the process less scalable if you are frequently adding individual products to delivery profiles.

Thanks, I don’t want to use productVariantCreate as they are being deprecated.

It is a real shame that you are encouraging us to use productVariantsBulkCreate and then removing features that are in deprecated calls, makes no sense to me.

Not being able to append an isbn to a deliveryprofile makes the whole process cumbersome, as if I have a profile with 1000s products in it, and want to add 1 I need to get all 1000 and then send 1001. Seems to me I would do a query for that delivery profile to get 1000, store them and then add my one and send the mutation. for 1001. Even writing that sounds stupid

Thanks
Grant