Graphql API mutation error

x-request-id:35538e34-faaf-49d9-9e8a-4b54665f5211-1734451478

Hello,

We are switching from REST to GraphqlAPI and I have seen some strange behaivor.

By mutating the order’s shipping address and an extra order.email or order.phone we get a “Too many attempts” error, which is not expected. Here are the details:

Query: mutation orderUpdate($input: OrderInput!) {
orderUpdate(input: $input) {
order {
id
email
note
shippingAddress {
firstName
lastName
address1
address2
city
phone
zip
}
}
userErrors {
field
message
}
}
}

Variables:
{input:{
id: ‘gid://shopify/Order/5789426254002’,
email: ‘new.email1@example.com’,
note: ‘i am the note tényleg1’,
shippingAddress: {
firstName: ‘Jane1’,
lastName: ‘Doe1’,
zip: ‘6001’,
city: ‘New York1’,
address1: ‘123 Shopify Way1’,
address2: ‘asd1’,
phone: ‘+36203333331’
}
}}

The response what we get is:

{
data: {
orderUpdate: {
order: null,
userErrors: [{ field: null, message: ‘Too many attempts. Please try again later.’ }],
},
},
extensions: {
cost: {
requestedQueryCost: 11,
actualQueryCost: 10,
‘throttle Status’: {
maximumAvailable: 2000,
currentlyAvailable: 1990,
restoreRate: 100,
},
},
},
};

We have also noticed it happens only if we want to mutate in one mutation an order property like email or phone and one of a shippingAddress property.

By the rest API we could update the order’s resource in one request, but here is not possible currently.

Would you be so kind to check it what is going on there?

I also noticed if we update an email and ANY other order resource we receive this.

So this variables are leading to that error:
{
“id”: “gid://shopify/Order/5789426254002”,
“email”: “new.email1@example.com”,
“note”: “i am the note tényleg1”,
“shippingAddress”: {
“firstName”: “Jane”,
“lastName”: “Doe1”,
“zip”: “60050”,
“city”: “New York1”,
“address1”: “123 Shopify Way1”,
“address2”: “asd1”,
“phone”: “+36203333331”
}
}

but if we just get rid of the email property everyting works as expected:
{
“id”: “gid://shopify/Order/5789426254002”,

“note”: “i am the note tényleg1”,
“shippingAddress”: {
“firstName”: “Jane”,
“lastName”: “Doe1”,
“zip”: “60050”,
“city”: “New York1”,
“address1”: “123 Shopify Way1”,
“address2”: “asd1”,
“phone”: “+36203333331”
}
}

We get also this “Too many attempts” error if we want to update ANY order property besides the emal like:

{
“id”: “gid://shopify/Order/5789426254002”,
“email”: “new.email1@example.com”,
“shippingAddress”: {
“firstName”: “Jane”,
}
}

Could you please use the mutation query below?

Include your token as a X-Shopify-Access-Token header on all API queries.

1: Mutation Query:

mutation orderUpdate($input: OrderInput!) {
  orderUpdate(input: $input) {
    order {
      id
      email
      note
      shippingAddress {
        firstName
        lastName
        address1
        address2
        city
        phone
        zip
      }
    }
    userErrors {
      field
      message
    }
  }
}

2: Variables

{
  "input": {
    "id": "gid://shopify/Order/5789426254002",
    "email": "new.email1@example.com",
    "note": "i am the note tényleg1",
    "shippingAddress": {
      "firstName": "Jane1",
      "lastName": "Doe1",
      "zip": "6001",
      "city": "New York1",
      "address1": "123 Shopify Way1",
      "address2": "asd1",
      "phone": "36203333331"
    }
  }
}

Sample: How to retrieve a list of products using the GraphQL Admin API

Hello AMal!

Thank you for your fast reply!

If I am not wrong I have pasted the exact same format as you asked.

I also receive an error if i just want to update the email only:

Request:
{
“query”: “mutation orderUpdate($input: OrderInput!) {orderUpdate(input: $input) { order { id email } userErrors { field message } } }”,
“variables”:{
“input”: { “id”: “gid://shopify/Order/5807461662898” , “email":"asd@gmail.com” }
}
}

Response is the exact same, “Too many attempts”
{“data”:{“orderUpdate”:{“order”:null,“userErrors”:[{“field”:null,“message”:“Too many attempts. Please try again
later.”}]}},“extensions”:{“cost”:{“requestedQueryCost”:10,“actualQueryCost”:10,“throttleStatus”:{“maximumAvailable”:2000,“currentlyAvailable”:1990,“restoreRat
e”:100}}}}

Would you be so kind to check it what is going on here?

Thank you in advance!

Ákos

I also receive this in the shopify admin page.