App reviews, troubleshooting, and recommendations
Hi,
I would like to use the OrderCreateCustomerInput when using the mutation orderCreate of the graphQL api.
For example, when using the example shown in the documentation:
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation OrderCreate($order: OrderCreateOrderInput!, $options: OrderCreateOptionsInput) {
orderCreate(order: $order, options: $options) {
userErrors {
field
message
}
order {
id
displayFinancialStatus
customer {
email
firstName
lastName
}
}
}
}`,
"variables": {
"order": {
"lineItems": [
{
"variantId": "gid://shopify/ProductVariant/43729076",
"quantity": 1
}
],
"customer": {
"toUpsert": {
"email": "foo.bar@shopify.com",
"firstName": "Foo",
"lastName": "Bar"
}
},
"financialStatus": "PAID"
}
},
},
});
an error is thrown:
Error: Variable $order of type OrderCreateOrderInput! was provided invalid value for customer (Field is not defined on OrderCreateOrderInput)
Can you provide more details about how to use this fields?
Best,
Solved! Go to the solution
This is an accepted solution.
Solved.
I wasn't using the last API version
This is an accepted solution.
Solved.
I wasn't using the last API version
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025