I’m trying to use the checkoutBrandingUpsert mutation to set a custom font for both primary and secondary typography in the Shopify checkout. However, I’m running into an issue when adding a name field for the custom font.
Here’s my current setup:
mutation checkoutBrandingUpsert($checkoutBrandingInput: CheckoutBrandingInput!, $checkoutProfileId: ID!) {
checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {
checkoutBranding {
designSystem {
typography {
primary {
customFontGroup {
name
base {
sources
weight
}
bold {
sources
weight
}
}
}
}
}
}
userErrors {
code
field
message
}
}
}
QUery:
{
"checkoutProfileId": "gid://shopify/CheckoutProfile/ProfileID",
"checkoutBrandingInput": {
"designSystem": {
"typography": {
"primary": {
"customFontGroup": {
"base": {
"genericFileId": "gid://shopify/GenericFile/FileID",
"weight": 400
},
"bold": {
"genericFileId": "gid://shopify/GenericFile/FileID",
"weight": 700
},
"name": "Industry Medium",
}
}
}
}
}
}
Despite this setup, I’m receiving an error related to the placement or usage of the "name"
field. Based on Shopify’s schema, I believe "name"
belongs inside the "customFontGroup"
, but I may be missing something.
Could someone guide me on the correct way to include "name"
in this mutation?