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

Support of a complexity evaluation mechanism to detect expensive operations #340

Open
jefrajames opened this issue Nov 4, 2020 · 1 comment

Comments

@jefrajames
Copy link
Contributor

GraphQL provides a lot of flexibility on the client-side which exposes to the risk of expensive operations on the server leading to potential DOS attacks. It would be nice to introduce a mechanism to limit the cost of an operation on the server.

SPQR provides with a mechanism that enables to limit the complexity of a schema and to define the cost of an operation with a @GraphQLComplexity annotation.

This is showcased in this test class:
https://github.com/leangen/graphql-spqr/blob/master/src/test/java/io/leangen/graphql/ComplexityTest.java

A similar feature would be a nice to have in the spec.

@t1
Copy link
Contributor

t1 commented Nov 5, 2020

More background about this can be found here

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

No branches or pull requests

2 participants