Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Get an estimated operation cost during the onSubgraphExecute hook #1389

@slavik-pastushenko

Description

@slavik-pastushenko

Hello!

I am wondering if it is possible to access the estimatedCost before actually sending a request to a subgraph?

I see that the calculation is done during this step: https://github.com/graphql-hive/gateway/blob/main/packages/runtime/src/plugins/useDemandControl.ts#L70.

The issue is, I want to know an estimated cost before sending a request, so I can build my logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions