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

Feature Request: Need API to limit query complexity / depth #231

Open
yookoala opened this issue Aug 7, 2017 · 8 comments
Open

Feature Request: Need API to limit query complexity / depth #231

yookoala opened this issue Aug 7, 2017 · 8 comments

Comments

@yookoala
Copy link

yookoala commented Aug 7, 2017

As title suggest. Library user would want to have a way to evaluate a graphql query complexity and refuse queries that are too complex.

@djmcgreal
Copy link

I believe https://www.npmjs.com/package/graphql-cost-analysis is the current JS library de jure. Potentially this doesn't go in the core go library?

@genert
Copy link

genert commented Jan 18, 2019

Bump.

@niondir
Copy link

niondir commented Nov 21, 2019

For bigger projects complexity is quiet an important feature. What are the plans to implement it?

My feeling is that there is not much new development at all on this library.

@sevenzhao
Copy link

There is already an API to limit the query depth, but no API to limit the query complexity.
The system should be protected from attack by complex querys.
So there should be a API to limit query complexity.

@hongbo-miao
Copy link

FYI, if need, in JavaScript world, today graphql-query-complexity is better than graphql-cost-analysis now.

@danielgtaylor
Copy link

This looks like a port of graphql-cost-analysis into Go: https://github.com/koron-go/gqlcost

@bielcarpi
Copy link

Any news on this? I would be very interesting to have, as mentioned, something like graphql-cost-analysis for JS

@maddsua
Copy link

maddsua commented Jul 22, 2024

Bumping as this is a needed feature.

@sevenzhao wdym there's already a way to limit depth? I'm not sure what are you referring to, mind giving an example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants