I am encountering an error when attempting to request the checkoutBraningupsert mutation while trying to attach the uploaded image ID to the header logo.
Here is the complete mutation:
const CHECKOUT_BRANDING_UPSERT = `#graphql
mutation CustomizingControls($checkoutBrandingInput: CheckoutBrandingInput!, $checkoutProfileId: ID!) {
checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {
checkoutBranding {
designSystem {
colors {
global {
brand
accent
}
}
}
customizations {
control {
labelPosition
}
}
}
userErrors {
field
message
}
}
}
`
await admin.graphql(CHECKOUT_BRANDING_UPSERT, {
variables: {
checkoutProfileId: 'gid://shopify/CheckoutProfile/XXXXXX',
checkoutBrandingInput: { customizations: {
"header": {
"alignment": "START",
"position": "START",
"banner": null,
"logo": {
"image": {
"mediaImageId": "gid://shopify/MediaImage/36440707072321"
}
}
}
} , designSystem: {} }
}
})

