const updatePickingOrderMutation = `
mutation UpdatePickingOrder($id: ID!, $input: UpdatePickingOrderInput!) {
updatePickingOrder(id: $id, input: $input) {
pickingOrder {
id
customerID
data
updatedAt
orderitems {
id
sku
quantity
}
}
workflows {
id
type
id
runID
status
}
}
}
`;
const variables = {
id: "550e8400-e29b-41d4-a716-446655440000",
input: {
data: {
order_number: "PO-12345-UPDATED",
priority: "urgent",
delivery_address: {
street: "456 Updated St",
city: "New Springfield",
postalCode: "67890",
country: "US"
},
notes: "Rush order - handle with care"
},
customerID: "123e4567-e89b-12d3-a456-426614174000"
}
};
// Using fetch or your preferred GraphQL client
const response = await fetch('/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN'
},
body: JSON.stringify({
query: updatePickingOrderMutation,
variables: variables
})
});
const result = await response.json();
console.log('Updated picking order:', result.data.updatePickingOrder);