@Luke This is a recent issue, as we just encounter this morning on 2025-10-31, on the 2025-01, 2025-10, Storefont cartCreate api –> cartCreate - Storefront API.
When ever we call this cartCreate Storefront api to create an empty cart, errors are being throw, saying certain fields does not exist, while on the official documentations, is there. Here is the returned errors;
{
"errors": [
{
"message": "Field 'discountApplication' doesn't exist on type 'CartDiscountAllocation'",
"locations": [
{
"line": 40,
"column": 14
}
],
"path": [
"mutation CreateCart",
"cartCreate",
"cart",
"lines",
"edges",
"node",
"discountAllocations",
"discountApplication"
],
"extensions": {
"code": "undefinedField",
"typeName": "CartDiscountAllocation",
"fieldName": "discountApplication"
}
},
{
"message": "Field 'optionValues' doesn't exist on type 'ProductOption'",
"locations": [
{
"line": 100,
"column": 20
}
],
"path": [
"mutation CreateCart",
"cartCreate",
"cart",
"lines",
"edges",
"node",
"merchandise",
"... on ProductVariant",
"product",
"options",
"optionValues"
],
"extensions": {
"code": "undefinedField",
"typeName": "ProductOption",
"fieldName": "optionValues"
}
},
{
"message": "Field 'preferences' doesn't exist on type 'CartBuyerIdentity'",
"locations": [
{
"line": 155,
"column": 8
}
],
"path": [
"mutation CreateCart",
"cartCreate",
"cart",
"buyerIdentity",
"preferences"
],
"extensions": {
"code": "undefinedField",
"typeName": "CartBuyerIdentity",
"fieldName": "preferences"
}
},
{
"message": "Field 'warnings' doesn't exist on type 'CartCreatePayload'",
"locations": [
{
"line": 168,
"column": 8
}
],
"path": [
"mutation CreateCart",
"cartCreate",
"warnings"
],
"extensions": {
"code": "undefinedField",
"typeName": "CartCreatePayload",
"fieldName": "warnings"
}
}
]
}
That return is base of this query we call on the cartCreate Storefront api
mutation CreateCart($input: CartInput!) {
cartCreate(input: $input) {
cart {
id
checkoutUrl
# Applied discount codes
discountCodes {
code
applicable
}
# Line items with detailed product & pricing info
lines(first: 100) {
edges {
node {
id
quantity
# Cost for this line (quantity × unit price)
cost {
subtotalAmount {
amount
currencyCode
}
totalAmount {
amount
currencyCode
}
}
# Any per-line discount allocations
discountAllocations {
discountedAmount {
amount
currencyCode
}
discountApplication {
targetType
value {
... on MoneyV2 {
amount
currencyCode
}
... on PricingPercentageValue {
percentage
}
}
}
}
# Custom attributes on the line
attributes {
key
value
}
# The variant being purchased
merchandise {
... on ProductVariant {
id
sku
title
# Unit price of the variant
price {
amount
currencyCode
}
# Image
image {
url
altText
}
# Weight & availability
weight
availableForSale
# Selected options (e.g. Size, Color)
selectedOptions {
name
value
}
# Parent product details
product {
id
title
handle
vendor
productType
description
options {
id
name
optionValues {
id
name
}
}
}
}
}
}
}
}
# Cart-level custom attributes
attributes {
key
value
}
# Breakdown of cart costs
cost {
totalAmount {
amount
currencyCode
}
subtotalAmount {
amount
currencyCode
}
totalTaxAmount {
amount
currencyCode
}
totalDutyAmount {
amount
currencyCode
}
}
# Buyer identity & preferences
buyerIdentity {
email
phone
countryCode
deliveryAddressPreferences {
... on MailingAddress {
address1
address2
city
provinceCode
countryCodeV2
zip
}
}
preferences {
delivery {
deliveryMethod
}
}
}
}
userErrors {
code
field
message
}
warnings {
code
message
target
}
}
}
However, a similar issue is also happening on this one as well, cartLinesAdd - Storefront API. Returning same error about certain fields not doesn’t exist on certain type.