Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust the default GraphQL complexity for queries that can potentially use indexation #2496

Open
rafal-ch opened this issue Dec 12, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@rafal-ch
Copy link
Contributor

Basically, this issue is about resolving the following TODO in the code.

pub const DEFAULT_QUERY_COSTS: Costs = Costs {
    // TODO: The cost of the `balance` and `balances` query should depend on the
    //  `OffChainDatabase::balances_enabled` value. If additional indexation is enabled,
    //  the cost should be cheaper.
    balance_query: 40001,
    coins_to_spend: 40001,

If the "balances" or "coins to spend" indexation is available in the particular instance of the client, these costs should be lower.

Please note that the default cost is no longer "const", as it depends on the flag in offchain DB metadata (indexation_availability flag).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant