Skip to content

Get an estimated operation cost during the onSubgraphExecute hook #1389

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

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