You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of that package or tool are you using?
2024-07
What version of Remix are you using?
No response
Steps to Reproduce
This morning, I am getting the following error on my cartCreate mutations:
ERROR No cart returned from cartCreate mutation { client: 'shopify',
operationType: 'mutation',
operationName: 'cartCreate',
statusCode: 200,
gqlErrors:
[ { message: 'Query has a depth of 18, which exceeds the max depth of 17.',
extensions: [Object] } ] }
The error message indicated an SSR error coming from the Shopify API. This issue was not present yesterday (Aug 8 2024). This issue occurs on my headless storefronts (Nuxt and Next) using the 2024-07 GraphQL API.
Oddly enough, the rest of the API queries and mutations (products, collections, customer, localization, etc.) still work that are non-cart related.
Expected Behavior
The cartCreate mutation and other cart mutations should work when initiated.
Actual Behavior
Currently, the cartCreate mutation does not seem to connect to Shopify and displays the message Query has a depth of 18, which exceeds the max depth of 17.. I am unsure what this message indicates in relation to the API itself.
The text was updated successfully, but these errors were encountered:
rylanharper
changed the title
[API Issue] I am getting the
[API Issue] cartCreate mutation errors upon startup in headless storefronts
Aug 9, 2024
I found the cause of the issue comes from adding in a ProductOption fragment within a Product query (or fragment) using the 2024-07 API version.
I have the following ProductOption fragment, which is used within my GraphQL product options:
fragment Option on ProductOption {
id
name
optionValues {
id
name
swatch {
color
image {
alt
id
previewImage {
altText
height
id
url
width
}
}
}
}
}
options(first: 250) {
...Option
}
This causes an error in the cartCreate mutation and causes a Netlify build error:
10:47:12 PM: [error] GraphQL Document Validation failed with 1 errors;
10:47:12 PM: Error 0: Cannot query field "optionValues" on type "ProductOption".
10:47:12 PM: at /opt/build/repo/web/queries/shopify/fragments/option.gql:4:3
10:47:12 PM: Error 0: Cannot query field "optionValues" on type "ProductOption".
10:47:12 PM: at queries/shopify/fragments/option.gql:4:3
Removing the ProductOption fragment will fix this issue. The issue does not occur when using the ProductOption data from the 2024-04 API version (which does not include the new optionValues object).
What is the location of your example repository?
No response
Which package or tool is having this issue?
Storefront API
What version of that package or tool are you using?
2024-07
What version of Remix are you using?
No response
Steps to Reproduce
This morning, I am getting the following error on my
cartCreate
mutations:The error message indicated an SSR error coming from the Shopify API. This issue was not present yesterday (Aug 8 2024). This issue occurs on my headless storefronts (Nuxt and Next) using the
2024-07
GraphQL API.Oddly enough, the rest of the API queries and mutations (products, collections, customer, localization, etc.) still work that are non-cart related.
Expected Behavior
The
cartCreate
mutation and other cart mutations should work when initiated.Actual Behavior
Currently, the
cartCreate
mutation does not seem to connect to Shopify and displays the messageQuery has a depth of 18, which exceeds the max depth of 17.
. I am unsure what this message indicates in relation to the API itself.The text was updated successfully, but these errors were encountered: