It appears that our credit limits is growing indefinitely, not stopping at 2002. It’s currently at 101732972, which corresponds to almost 40 days at 30 credits per second.
The problem is that we’re currently trying to test our request throttling and handling “not enough credits” errors.
We can still trigger “not enough credits” error by making request with crazy high complexity. However, then “time_remaining” is 0
:
curl --location --request GET 'https://public-api.shiphero.com/graphql' --header 'Content-Type: application/json' --header 'Authorization: Bearer {{ACCESS_TOKEN}}' --data '{"query":"query user_quota {\n user_quota {\n is_expired\n expiration_date\n time_remaining\n credits_remaining\n max_available\n increment_rate\n }\n}\n","variables":{}}'
{
"data": {
"user_quota": {
"is_expired": false,
"expiration_date": null,
"time_remaining": null,
"credits_remaining": 101733173,
"max_available": 2002,
"increment_rate": 30
}
},
"extensions": {
"throttling": {
"estimated_complexity": 0,
"cost": 1,
"cost_detail": {
"user_quota": {
"items_count": 0,
"cost": 1,
"total_cost": 1,
"fields": {}
}
},
"user_quota": {
"credits_remaining": 101733173,
"max_available": 2002,
"increment_rate": 30
}
}
}
}