и часто та же ошибка, например: «Переменной $basicCodeDiscount типа DiscountCodeBasicInput! было предоставлено недопустимое значение для customerGets.value.amount (поле не определено в DiscountCustomerGetsValueInput), customerGets.value.currencyCode (поле не определено в DiscountCustomerGetsValueInput)»< /p>
Код: Выделить всё
value = new { amount = new { amount = discount.Value, currencyCode = "EUR" } }; } var query = $@"mutation discountCodeBasicCreate($basicCodeDiscount: DiscountCodeBasicInput!) {{ discountCodeBasicCreate(basicCodeDiscount: $basicCodeDiscount) {{ codeDiscountNode {{ codeDiscount {{ ... on DiscountCodeBasic {{ title codes(first: 10) {{ nodes {{ code }} }} startsAt endsAt customerSelection {{ ... on DiscountCustomerAll {{ allCustomers }} ... on DiscountCustomers {{ customers {{ id email }} }} }} customerGets {{ value{{ ... on DiscountAmount {{ amount }} }} }} appliesOncePerCustomer usageLimit }} }} }} }} }}";Подробнее здесь: https://stackoverflow.com/questions/790 ... h-graph-ql