At the moment the pricing for APIs is very static. Each request predefined cost attached to it.
For example:
- Get a single content 1
- Query multiple contents: 1
- Query with GraphQL 2
- Bulk update contents 5
The goal was to reflect a little bit the costs, but it is difficult because you can make 100 of queries with GraphQL and very expensive bulk updates. So some of the requests are underpriced and some of the are overpriced. But I think it evens out overall.
My idea is to make the pricing more dynamic based on the actual queries and operations. So each update could be 1, each query by ID could 0.5 and then each normal query could be 1 again. These values would then be summed up and used for the costs. Some queries are then cheaper and others would be more expensive. But you could optimize your code for costs basically, which is difficult at the moment.
What do you think about it?