Saving data in metafields for Bundles using the Cart Transform Function

How do I add data to metafields for cartTransform.

Hi Ashfaq_,

There doesn’t seem to currently be a specific mutation for setting metafields on the cartTransform object - would you be able to use cartMetafieldsSet as a workaround?

I would like to use the cartTransform metafields in the cartTransfrom function as input is it possible to attach meta fields to it through cartMetafieldsSet ?

I found the workaround for this!
you can use mutation

mutation MetafieldsSet($metafields: [MetafieldsSetInput!]!) {
                metafieldsSet(metafields: $metafields) {
                    metafields {
                        id
                        key
                        namespace
                        value
                        createdAt
                        updatedAt
                    }
                    userErrors {
                        field
                        message
                        code
                    }
                }
            }

to attach the metafield to the cartTransform object.

Hey, did you add that in run.graphql file inside your extension? Can you show me how you did it? Thanks