graphql
graphql copied to clipboard
How to define struct
Hi,I wanna to invoke an graphql api,but the request body about struct is too long! I need help for how to define struct like thie:
mutation {
createShoppingProducts(
adId: "12345678",
shoppingProducts: [
{
id: "P11",
title: "New Earpods",
description: "Noise cancellation enabled earpods",
price: {
amount: "111.5",
currency: "USD"
},
availability: "in stock",
condition: "Used",
link: "https://xxx.com"
}
]
) {
response {
id
title
price {
amount
}
}
errors {
id
field
messages
warnings
originalValue
}
}
}
Look forward to reply!