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

Is this still mainated? What are good alternatives? #44

Open
AdamZaczek opened this issue Jan 4, 2021 · 3 comments
Open

Is this still mainated? What are good alternatives? #44

AdamZaczek opened this issue Jan 4, 2021 · 3 comments

Comments

@AdamZaczek
Copy link

Hey! I'm looking for graphql api protection tools and this looks neat but I'm worried about using unmaintained dep in my app.

@ivome
Copy link

ivome commented Jun 22, 2021

Check out https://github.com/slicknode/graphql-query-complexity

This does pretty much everything this library does and more. It is fully customizable and extensible so you can bring your own logic and combine it with the built-in estimators.
I'm actively maintaining this, it has more than 500k downloads/month and it is used by the big GraphQL frameworks like TypeGraphQL, NestJS, Nexus.

@Bessonov
Copy link

Hey @ivome , thank you for the link. Can it be used as a proxy? For example, I want to prevent expensive queries to reach hasura.

@ivome
Copy link

ivome commented Jun 22, 2021

@Bessonov If you put a NodeJS proxy in front of it, you can just calculate the complexity and then only forward the queries that meet the criteria: https://github.com/slicknode/graphql-query-complexity#calculate-query-complexity

Since Hasura has a generated GraphQL API, you could also create an estimator that adds all the configuration automatically. That's what we're doing at Slicknode

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

3 participants