i have copied the mutation from shopify admin api documentation but it shows orderCreate doesn’t exist on type Mutation.
i am using shopify-api-node npm package
How can i solve this??
const mutation =`mutation OrderCreate($order: OrderCreateOrderInput!, $options: OrderCreateOptionsInput) {
orderCreate(order: $order, options: $options) {
userErrors {
field
message
}
order {
id
lineItems(first: 100) {
nodes {
variant {
id
}
id
title
quantity
}
}
}
}
}`
const createdVariables = {
order: {
lineItems: lineItems,
tags: [`${locationName}`, `auto-generated`, `${monthName}-${year}`],
note: `Auto-generated draft order at ${locationName}. Month: ${monthName} ${year}. Location ID: ${locationId}`,
},
};
const response = await shopify.graphql(mutation, createdVariables);