hasura / hasura/graphql-engine

Hasura "node limit" is being calculated incorrectly

Open
#8,550 8 comments 1 reaction 1 assignee Claimed by @Naveenaidu View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: v2.6.2-cloud.1

### Environment

Cloud

### What is the expected behaviour?

I expect the node limit to be based on the number of nodes in the response.

For more info on node limits, see https://hasura.io/docs/latest/graphql/cloud/security/api-limits/#node-limits

### Keywords

Security, node limit

### What is the current behaviour?

When I set the node limit to 200, one of my queries starts failing, even though the payload contains far fewer than 200 nodes.

My best guess is that the query contains a lot of fragments, and those fragments often query for the same nodes. And it appears as if the nodes are being double counted.

This is not the desired behavior, because if multiple fragments query for the same node, it doesn't make the query any more expensive.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.