# Retry issue with GraphQL

**URL:** https://community.shiphero.com/t/retry-issue-with-graphql/2169
**Category:** GraphQL API
**Created:** [September 14, 2022, 2:57pm UTC](https://community.shiphero.com/t/retry-issue-with-graphql/2169 "2022-09-14T14:57:14Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![cschouten](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@cschouten](https://community.shiphero.com/u/cschouten)
#### Post date: [September 14, 2022, 2:57pm UTC](https://community.shiphero.com/t/retry-issue-with-graphql/2169/1 "2022-09-14T14:57:14Z")

</div>

I asked [Portable.io](http://Portable.io) to see if they could build a custom connector based on ShipHero’s API, but they ran into some snags.

They mentioned the API doesn’t return 429 error codes. So a potential ETL process could silently fail / stop an extract before data is complete if we accidentally hit the limit.

Does ShipHero have any advice on how to handle the aforementioned retry issue?

---

<div class="post-metadata">

### Author: ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)
#### Post date: [September 14, 2022, 3:00pm UTC](https://community.shiphero.com/t/retry-issue-with-graphql/2169/2 "2022-09-14T15:00:58Z")

</div>

Hey @cschouten,

Thanks for reaching out and welcome to our Developer Community Site!  
I’ll start looking into this matter and get back to you.

Please let me know if you have any questions or concerns in the meantime.

Best,  
RayanP

---

<div class="post-metadata">

### Author: ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)
#### Post date: [September 14, 2022, 8:57pm UTC](https://community.shiphero.com/t/retry-issue-with-graphql/2169/3 "2022-09-14T20:57:18Z")

</div>

Hey Team,

Thanks for hanging in there.

I believe a 429 has something to do with throttling. In all of the responses we send the details regarding credits expended and credits remaining to try and help with that.

I can try to help optimize the queries and mutations are being ran, if you’d like to send the request ids for me to look into.

Please let me know if you have any questions or concerns.  
Best,  
RayanP

---

<div class="post-metadata">

### Author: ![cschouten](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@cschouten](https://community.shiphero.com/u/cschouten)
#### Post date: [September 15, 2022, 10:39pm UTC](https://community.shiphero.com/t/retry-issue-with-graphql/2169/4 "2022-09-15T22:39:30Z")

</div>

Thanks @sh-agent!

To clarify, should I post those queries here, or would it be okay to email ShipHero?

Cheers,  
Colin

---

<div class="post-metadata">

### Author: ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)
#### Post date: [September 16, 2022, 11:08am UTC](https://community.shiphero.com/t/retry-issue-with-graphql/2169/5 "2022-09-16T11:08:40Z")

</div>

Hey @cschouten,

You can go ahead and post them here. I’ll be happy to review them and try to help, best I can.

Please let me know if you have any questions or concerns!

Best,  
RayanP

---

<div class="post-metadata">

### Author: ![cschouten](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@cschouten](https://community.shiphero.com/u/cschouten)
#### Post date: [September 16, 2022, 5:08pm UTC](https://community.shiphero.com/t/retry-issue-with-graphql/2169/6 "2022-09-16T17:08:03Z")

</div>

Good stuff. This Orders query is written in Java. Let me know if you need me to add additional color/context to this query, @sh-agent. Thanks again for taking a look.

```auto
static final String DATE_FROM_PLACEHOLDER = "'date_from'";
static final String NEXT_PAGE_PLACEHOLDER = "'next_page'";
static final String ID_PLACEHOLDER = "'id'";
static final String INDEX_PLACEHOLDER = "'index'";

    private static final String ORDER_COMMON =
            " 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" +
            " ready_to_ship" +
            " holds {" +
            " address_hold" +
            " fraud_hold" +
            " payment_hold" +
            " shipping_method_hold" +
            " operator_hold" +
            " client_hold" +
            " }" +
            " line_items(first: 5" + NEXT_PAGE_PLACEHOLDER + ") {" +
            " pageInfo {" +
            " hasNextPage" +
            " endCursor" +
            " }" +
            " edges {" +
            " node {" +
            " id" +
            " sku" +
            " quantity" +
            " quantity_allocated" +
            " quantity_pending_fulfillment" +
            " fulfillment_status" +
            " backorder_quantity" +
            " promotion_discount" +
            " }" +
            " }" +
            " }";

    static final String ORDER =
            "{" +
            " order (id: \"" + ID_PLACEHOLDER + "\") {" +
            " data {" +
                   ORDER_COMMON.replace("first: 5", "first: 50") +
            " }" +
            " }" +
            "}";

    static final String ORDERS =
            "{" +
            " orders (updated_from: \"" + DATE_FROM_PLACEHOLDER + "\") {" +
            " data(first: 10" + NEXT_PAGE_PLACEHOLDER + ") {" +
            " pageInfo {" +
            " hasNextPage" +
            " endCursor" +
            " }" +
            " edges {" +
            " node {" +
                       ORDER_COMMON +
            " }" +
            " }" +
            " }" +
            " }" +
            "}";

```

---

<div class="post-metadata">

### Author: ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)
#### Post date: [September 16, 2022, 8:48pm UTC](https://community.shiphero.com/t/retry-issue-with-graphql/2169/7 "2022-09-16T20:48:44Z")

</div>

Hey @cschouten,

I’m not super well versed with Java so I’ll have to research this one a bit more. I did notice this line here  
`"ORDER_COMMON.replace("first: 5", "first: 50")"`. I’d recommend lowering that value of 50, and using pagination more there. I’ll be looking into this some more!

Please let me know if you have any questions or concerns.

Best,  
RayanP
