Getting 504 Errors on GraphQL orders query

We are facing issues with the graphQL API for orders. It takes too long to respond and then provides a 504 Gateway Error. Is the orders graphQL API down or not working? I’m using the example query provided in the documentation.

query {
 orders {
request_id
complexity
data(first: 10) {
  edges {
    node {
      id
      legacy_id
      order_number
      partner_order_id
      shop_name
      fulfillment_status
      order_date
      total_tax
      subtotal
      total_discounts
      total_price
      auto_print_return_label
      custom_invoice_url
      account_id
      email
      profile
      packing_note
      required_ship_date
      flagged
      saturday_delivery
      ignore_address_validation_errors
      priority_flag
      source
      third_party_shipper {
        zip
        account_number
        country
      }

      gift_invoice
      order_history {
        created_at
        information
        user_id
      }
      allow_partial
      require_signature
      adult_signature_required
      alcohol
      expected_weight_in_oz
      insurance
      insurance_amount
      currency
      has_dry_ice
      allocation_priority
      allow_split
      line_items(first: 10) {
        edges {
          node {
            sku
            quantity
            quantity_allocated
            quantity_pending_fulfillment
            backorder_quantity
            promotion_discount
          }
        }
      }
    }
  }
}
}
}

@tomasw I still need help on this issue.

Hi @wcordelo
Welcome to the community! And I apologize for the delayed response.
We had a degraded performance yesterday due to an Auth0 incident, but it should be resolved by now.

Are you still experiencing a timeout? If that is the case, do you happen to have the Request ID? that way we can investigate further using that ID

Thanks in advance!
Tom

Hi @tomasw, unfortunately I do not because the API times out before it provides me with a request_id. I get the following error:

504 Gateway Time-out

504 Gateway Time-out

I see, thanks for confirming that @wcordelo!
Quick question, what is the timeout set in your http library for making the requests?

Thanks again!
Tom

Hi @tomasw, the timeout is set to 4 minutes

Oh ok, that should definitely be more than enough

Does the same thing happen for this query?

query {
  account {
    request_id
    complexity
    data {
      id
      legacy_id
    }
  }
}

Let me know if you are able to get a request_id for that one

Hi @tomasw, the rest of the queries work on my end including the one you shared (except for orders). This is the request_id for that query: 60807f67dfde9668cd63a1c6

Hi @wcordelo !

Thanks for that ID! I know what you are referring to now
It might be that the amount of orders that it needs to search from might be too many.

Have you tried using a timeframe in the criteria of the Query?

Something like this:

query {
  orders(order_date_from:"2020-01-01" order_date_to:"2021-01-01") {
    request_id
    complexity
    data(first: 10) {
      edges {
        node {
          id
        }
      }
    }
  }
}

Let me know if that still doesn’t work. Thanks again for the patience!
Tom

Hi @tomasw, add the following works for me: orders(order_date_from:“2020-01-01” order_date_to:“2021-01-01”) . Thanks!

1 Like