# Fail to query with first \< 10

**URL:** https://community.shiphero.com/t/fail-to-query-with-first-10/1692
**Category:** GraphQL API
**Created:** [November 11, 2021, 5:26pm UTC](https://community.shiphero.com/t/fail-to-query-with-first-10/1692 "2021-11-11T17:26:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![hansdaigle](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/hansdaigle/32/369_2.png) [@hansdaigle](https://community.shiphero.com/u/hansdaigle)
#### Post date: [November 11, 2021, 5:26pm UTC](https://community.shiphero.com/t/fail-to-query-with-first-10/1692/1 "2021-11-11T17:26:46Z")

</div>

Hello guys,

If I query the GraphQL API with the relay parameters “first” \< 10 the request just hangs.

This works:

```auto
{ orders(shop_name: "test.store") { request_id complexity data(first:10, sort:"+order_date") { edges { node { id shop_name order_number fulfillment_status order_date } } } } }

```

This fails:

```auto
{ orders(shop_name: "test.store") { request_id complexity data(first:9, sort:"+order_date") { edges { node { id shop_name order_number fulfillment_status order_date } } } } }

```

Can someone confirm that querying with first \< 10 is working for them?

Thank you,

Hans Daigle

---

<div class="post-metadata">

### Author: ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)
#### Post date: [November 11, 2021, 5:59pm UTC](https://community.shiphero.com/t/fail-to-query-with-first-10/1692/2 "2021-11-11T17:59:31Z")

</div>

> [@hansdaigle](#):
>
> ```auto
> { orders(shop_name: "test.store") { request_id complexity data(first:10, sort:"+order_date") { edges { node { id shop_name order_number fulfillment_status order_date } } } } }
> 
> ```

Hello @hansdaigle!  
I just tested this and it is working for me (I copy-pasted your queries).  
Would you please share the request ID of the failed query so I can trace the call?  
Have a great day!  
Tomas

---

<div class="post-metadata">

### Author: ![hansdaigle](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/hansdaigle/32/369_2.png) [@hansdaigle](https://community.shiphero.com/u/hansdaigle)
#### Post date: [November 11, 2021, 6:26pm UTC](https://community.shiphero.com/t/fail-to-query-with-first-10/1692/3 "2021-11-11T18:26:36Z")

</div>

Hey @tomasfd,

I don’t have a request ID because it’s hanging and timeout. ☹

Did you try the first \< 10 one? (you linked the first \>=10 in your comment)

Try this one (you might need data for it to timeout):

```auto
{ orders(shop_name: "test.store") { request_id complexity data(first:4, sort:"+order_date") { edges { node { id shop_name order_number fulfillment_status order_date } } } } }

```

Cheers,

Hans

---

<div class="post-metadata">

### Author: ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)
#### Post date: [November 12, 2021, 2:13pm UTC](https://community.shiphero.com/t/fail-to-query-with-first-10/1692/4 "2021-11-12T14:13:15Z")

</div>

Hello @hansdaigle!  
Yes, I meant to quote both, sorry for that.  
They were working for me in my test account. But now I tried to test your account, and I’m getting the timeout, after 180secs it ends the connection with an HTML 504 error. Is the same happening to you?  
Have a nice day!  
Tomas

---

<div class="post-metadata">

### Author: ![hansdaigle](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/hansdaigle/32/369_2.png) [@hansdaigle](https://community.shiphero.com/u/hansdaigle)
#### Post date: [November 12, 2021, 2:26pm UTC](https://community.shiphero.com/t/fail-to-query-with-first-10/1692/5 "2021-11-12T14:26:21Z")

</div>

Hi @tomasfd,

Yes exactly, but it’s working for `first > =10`. Does it work for you when you go higher than 10?

Hans

---

<div class="post-metadata">

### Author: ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)
#### Post date: [November 12, 2021, 4:41pm UTC](https://community.shiphero.com/t/fail-to-query-with-first-10/1692/6 "2021-11-12T16:41:44Z")

</div>

Hi @hansdaigle!  
I’ve been doing further testing, and I am experiencing the same, but my limit is 20. The query works for \>=20, and I get the timeout for \<20. Can you check this on your side? In case it changed now.  
In the meantime, I will be escalating this issue as it seems to be a bug.  
I appreciate your patience!  
Tomas

---

<div class="post-metadata">

### Author: ![hansdaigle](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/hansdaigle/32/369_2.png) [@hansdaigle](https://community.shiphero.com/u/hansdaigle)
#### Post date: [November 12, 2021, 5:31pm UTC](https://community.shiphero.com/t/fail-to-query-with-first-10/1692/7 "2021-11-12T17:31:05Z")

</div>

Hi @tomasfd,

> =10 is still working for me, my script is set to pull exactly 10 orders every 5 minutes and it’s still running.

I do retry 3 times if I get a timeout though.

Thank you for digging into it, let me know when you have updates!

Cheers,  
Hans
