pub fn worst_case_point_cost(document: &str) -> Result<u64, NodeCountError>Expand description
The most rate-limit points one call of document could spend, by GitHub’s published
rules.
Computed offline from the document’s own text under largest_page_sizes — no
network, no credential and no schema — by
github_graphql_node_count::point_cost, which is where the rules themselves live.
This is cost, metered per hour against the allowance one credential shares across
everything it does; it is not nodeCount, which is worst_case_node_count and is
bounded per query by NODE_COUNT_LIMIT. There is no per-call ceiling to hold this
under, so what tests/point_cost.rs does with it is pin every document in
graphql::DOCUMENTS at what it costs, and the credentialed lane reconciles those
figures against GitHub’s own reported cost.
§Errors
Returns the calculation’s own NodeCountError when document does not parse, holds
no single operation, or binds a page size this source does not name — each of which is
a defect in the document rather than a number.