Hello,> > We are encountering an issue with the Volume Discount Function API. Whenever we send a request through Postman, we receive an “internal server error” message. We have included the GraphQL queries and their outputs below. Please Provide us a Solution.
Test Cases
Case i)
Query :
{
shop {
name
}
}
Output :
Status 200 with proper output
Case ii)
mutation {
discountAutomaticAppCreate(automaticAppDiscount: {
title: "Custom price",
functionId: "",
startsAt: "2024-06-22T00:00:00",
combinesWith: {
orderDiscounts: true,
productDiscounts: true,
shippingDiscounts: true
},
}) {
userErrors {
field
message
}
automaticAppDiscount {
discountClass
title
startsAt
discountId
}
}
}
Output :
{
"errors": [
{
"message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 0eec6bac-e14d-4571-a658-7d6893ca9910-1719579159 (include this in support requests).",
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"requestId": "0eec6bac-e14d-4571-a658-7d6893ca9910-1719579159"
}
}
]
}
Case iii)
mutation {
discountAutomaticAppCreate(automaticAppDiscount: {
title: "custom price",
functionId: " ",
startsAt: "2024-06-22T00:00:00",
combinesWith: {
orderDiscounts: true,
productDiscounts: true,
shippingDiscounts: true
},
}) {
userErrors {
field
message
}
automaticAppDiscount {
discountClass
title
startsAt
}
}
}
Output: Status 200 but when we check on backend, discount is not created
{
"data": {
"discountAutomaticAppCreate": {
"userErrors": [],
"automaticAppDiscount": {
"discountClass": "PRODUCT",
"title": "custom price",
"startsAt": "2024-06-22T00:00:00Z"
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 2000.0,
"currentlyAvailable": 1990,
"restoreRate": 100.0
}
}
}
}
