the best way to cost a query is to run it and get the field-level itemized costs
True, but for software there are always many variables at play.
I should have explained my motivation: A concurrent system with maximum efficiency.
Setup
My application is very data-heavy.
When multiple tasks are going on at the same time for the same store, my system has to share resources (points). Right now we use a lock so that only 1 can request at a time, AND after each query the caller records the returned points. Then the next caller can look at the number of available points and the time since the last call to determine whether it can expect its call to succeed. However right now, clients do not know the cost of the query that they are about to make. Therefore clients always assume that their query will use the maximum number of points: 1000 points. So the client will wait until at least 1000 points are available.
Limitation
That system is already quite efficient. I believe that it is as efficient as possible _when the system as a whole needs to use more points than the maximumAvailable.
However, because it is pessimistic WRT the points usage of every call, it is less efficient when a set of queries needs to use more than the maximumAvailable.
If the system needs to use fewer than the maximum available, then clients could all request in parallel.
Solution
If a client could know the cost of its own query ahead of time, then it could know whether it can safely make its query without waiting for the lock.
The first query would know (pessimistic estimate) its own query cost and deduct that from the number available. The second query would now (pessimistic estimate) the cost of its query too, and could immediately decide whether to run without waiting for the response from Shopify about the cost of the first query.
Knowing the cost of its own query would also allow clients to make queries in parallel without worry that one (or more) might fail due to a race condition.
Workaround
So yes, right now I could exclusively use queries that always have the same cost and meticulously record the cost of every query (and keep it up to date) so that each query would know its cost ahead of time. But a better solution would be an automated system that can estimate (accurately or at least pessimistically) the cost of any query ahead of time.
I may release my code publicly so that others can benefit from a maximally efficient and distributed query system.