Operation costs for API
Due to the nature of GraphQL based API the complexity and workload of various request may strongly differ among each other. That is why quotas and usage rates use „operation cost" to assess your real usage of the API.
All rates' or quotas' values are to be interpreted as operation cost values.
Example 1
<code> getOrder... </code> <code> { json response } </code>
Each loaded entity and each subordinate load of data are 1 unit of operation cost. For the example above and returned data operation cost of running that query would be #32.
Example 2
query {
getOrder(order_num: "O-123456“){ order_num price_elements { title } items { item_label product { title } quantity } }
}
Answer
{ "data": { "getOrder": { "order_num": "O-123456", "price_elements": [ { "title": "Pickup point" }, { "title": "Paypal" } ], "items": [ { "item_label": "Product A, Green", "product": { "title": "Product A" }, "quantity": 1 }, { "item_label": "Product B, Red", "product": { "title": "Product B" }, "quantity": 1 } ] } } }
Each loaded entity and every subordinate data load count as 1 operational cost unit. In the example above, the number of data operational costs for executing this query would be 4, because the query loads a total of 4 entities: the order, the price element, the order item, and within the order item, the product entity is also loaded.