# Warehouse\_products inside products query penalized too high

**URL:** <https://community.shiphero.com/t/warehouse-products-inside-products-query-penalized-too-high/888>\
**Category:** GraphQL API\
**Created:** [October 13, 2020, 5:50am UTC](https://community.shiphero.com/t/warehouse-products-inside-products-query-penalized-too-high/888 "2020-10-13T05:50:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maomuriel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/maomuriel/32/238_2.png) [@maomuriel](https://community.shiphero.com/u/maomuriel)\
**Post date:** [October 13, 2020, 5:50am UTC](https://community.shiphero.com/t/warehouse-products-inside-products-query-penalized-too-high/888/1 "2020-10-13T05:50:15Z")

</div>

Hi Guys,

We’re asking for products in GraphQL API, that query must include warehouse\_products field, but it is getting to expensive adding this field. Next query penalize with 1 every product node in query:

query{  
products{  
complexity,  
request\_id,  
data(first:10){  
pageInfo{  
hasNextPage,  
startCursor,  
endCursor,  
}  
edges{  
node{  
id,  
created\_at,  
updated\_at,  
legacy\_id,  
name,  
sku,  
barcode,  
}  
}  
}  
}  
}

But if we add warehouse\_products, the API is going to penalize with 30 points every product in query, like this:

query{  
products{  
complexity,  
request\_id,  
data(first:10){  
pageInfo{  
hasNextPage,  
startCursor,  
endCursor,  
}  
edges{  
node{  
id,  
created\_at,  
updated\_at,  
legacy\_id,  
name,  
sku,  
barcode,  
warehouse\_products{  
inventory\_bin,  
available  
}  
}  
}  
}  
}  
}

Why is it too expensive to add warehouse\_products field in query?  
How can we minimize the penalization for a query like that?

---

<div class="post-metadata">

**Author:** ![galvarez](https://avatars.discourse-cdn.com/v4/letter/g/d2c977/32.png) [@galvarez](https://community.shiphero.com/u/galvarez)\
**Post date:** [October 14, 2020, 2:37pm UTC](https://community.shiphero.com/t/warehouse-products-inside-products-query-penalized-too-high/888/2 "2020-10-14T14:37:18Z")

</div>

Hello @maomuriel the query cost is due the field **available** which is an expensive calculation which costs 30 credits.
