# Location query by name returning null

**URL:** <https://community.shiphero.com/t/location-query-by-name-returning-null/2572>\
**Category:** GraphQL API\
**Created:** [August 4, 2023, 1:40am UTC](https://community.shiphero.com/t/location-query-by-name-returning-null/2572 "2023-08-04T01:40:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [August 4, 2023, 1:40am UTC](https://community.shiphero.com/t/location-query-by-name-returning-null/2572/1 "2023-08-04T01:40:53Z")

</div>

Here is my query:

{location(name:“AK03101”){data {name id}}}

Here is the result:

{“data”:{“location”:{“request\_id”:“64cc54242637419180e9c150”,“data”:null}},“extensions”:{“throttling”:{“estimated\_complexity”:2,“cost”:1,“cost\_detail”:{“location”:{“items\_count”:0,“cost”:1,“total\_cost”:1,“fields”:{}}},“user\_quota”:{“credits\_remaining”:1892,“max\_available”:2002,“increment\_rate”:30}}}}

I am using a 3PL parent API key. I have confirmed the location exists:

 ![error1](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/937d53d85c4ddefb69dba27f1b568b2d2a58153e.png)

Why is the location query data returning null ?

---

<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:** [August 4, 2023, 11:06am UTC](https://community.shiphero.com/t/location-query-by-name-returning-null/2572/2 "2023-08-04T11:06:50Z")

</div>

Hey @bbarrett,

Thanks for reaching out!

I’ll look into this issue and update you shortly.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [August 4, 2023, 6:44pm UTC](https://community.shiphero.com/t/location-query-by-name-returning-null/2572/3 "2023-08-04T18:44:54Z")

</div>

Thanks Rayan. Any update on this?

---

<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:** [August 7, 2023, 12:15pm UTC](https://community.shiphero.com/t/location-query-by-name-returning-null/2572/4 "2023-08-07T12:15:31Z")

</div>

Hey @bbarrett,

Thanks for hanging in there!

I’ve gone ahead and made an Engineering Ticket regarding this issue. I did notice that I was able to query this location by ID instead as a temporary work around.

```auto

{
  location(id:"7829680") {
    request_id
    complexity
    data {
      id
      legacy_id
      account_id
      warehouse_id
    }
  }
}

```

I’ll update you here when a fix has been released for querying by name for this location.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)\
**Post date:** [August 7, 2023, 12:35pm UTC](https://community.shiphero.com/t/location-query-by-name-returning-null/2572/5 "2023-08-07T12:35:30Z")

</div>

I need to query by name to get the id. So, I really need the location query by name to work as intended. It would appear that this same problem has been reported previously. Please encourage your team to provide a fix. It appears to be a bug.
