A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
my query is
query {
orders(first:33, query:"fulfillment_status:unfulfilled AND shippingAddress.country:United States AND -tag:'handdle by itamar wherhous'"){
edges {
node {
id
tags
displayFulfillmentStatus
shippingAddress {
address1
city
country
firstName
lastName
phone
provinceCode
zip
}
lineItems(first: 7) {
nodes {
quantity
product {
id
}
variant {
sku
}
}
}
fulfillmentOrders(first: 3, reverse: true) {
nodes {
id
}
}
}
}
}
}
and if change to
orders(first:34, query:"fulfillment_status:unfulfilled AND shippingAddress.country:United States AND -tag:'handdle by itamar wherhous'"){
i got this error
{
"errors": [
{
"message": "Query cost is 1022, which exceeds the single query max cost limit (1000).\n\nSee https://shopify.dev/concepts/about-apis/rate-limits for more information on how the\ncost of a query is calculated.\n\nTo query larger amounts of data with fewer limits, bulk operations should be used instead.\nSee https://shopify.dev/api/usage/bulk-operations/queries for usage details.\n",
"extensions": {
"code": "MAX_COST_EXCEEDED",
"cost": 1022,
"maxCost": 1000,
"documentation": "https://shopify.dev/api/usage/rate-limits"
}
}
]
}
i have more then 33 items i have around 300 my question is how i can query in loop first time until 33 and next iteration from 34 until 66 And so on
Solved! Go to the solution
This is an accepted solution.
Have you taken a look at pagination?
https://shopify.dev/api/usage/pagination-graphql
This is an accepted solution.
Have you taken a look at pagination?
https://shopify.dev/api/usage/pagination-graphql
Thank you very much it helped me