// Create metafield definition for product variants that are part of the bundle
const componentReference = await shopify.graphql(
`mutation ($definition: MetafieldDefinitionInput!) {
metafieldDefinitionCreate(definition: $definition){
createdDefinition {
id
}
userErrors {
message
}
}
}`,
{
definition: {
key: "componentReference",
type: "list.variant_reference",
namespace: "eliteBundle",
name: "Bundle component reference",
ownerType: "PRODUCTVARIANT",
},
}
);
// Create metafield definition for product variants that are part of the bundle
const componentReference = await shopify.graphql(
`mutation ($definition: MetafieldDefinitionInput!) {
metafieldDefinitionCreate(definition: $definition){
createdDefinition {
id
}
userErrors {
message
}
}
}`,
{
definition: {
key: "componentReference",
type: "list.variant_reference",
namespace: "eliteBundle",
name: "Bundle component reference",
ownerType: "PRODUCTVARIANT",
},
}
);