Graph QL Appsheet intergration response error using DiscountCodeBasic Creation

{
“query”: “mutation discountCodeBasicCreate($basicCodeDiscount: DiscountCodeBasicInput!) { discountCodeBasicCreate(basicCodeDiscount: $basicCodeDiscount) { codeDiscountNode { codeDiscount { … on DiscountCodeBasic { title codes(first: 10) { nodes { code } } startsAt endsAt customerSelection { … on DiscountCustomerAll { allCustomers } } customerGets { value { … on DiscountAmount { amount appliesOnEachItem } } items { … on AllDiscountItems { allItems } } } } } } userErrors { field code message } } }”,
“variables”: {
“basicCodeDiscount”: {
“appliesOncePerCustomer”: true,
“code”: “SUMMER20”,
“customerSelection”: {
“customers”: {
“add”: [“”]
}
},
“customerGets”: {
“value”: {
“discountAmount”: {
“amount”: “100.00”,

“appliesOnEachItem”: false
}
},
“items”: {
“all”: true
}
},
“startsAt”: “2024-11-03T00:00:00Z”,
“endsAt”: null,
“title”: “Fixed amount discount during the summer of 2024”,
“usageLimit”: 1
}
}
}

can you please help me on this

i always get this error

Task Properties

{“Response”:"{"errors":[{"message":"Selections can’t be made directly on unions (see selections on DiscountCustomerSelection)","locations":[{"line":1,"column":285}],"path\

1 Like