graphql-query-complexity

GraphQL query complexity analysis and validation for graphql-js (by slicknode)

Graphql-query-complexity Alternatives

Similar projects and alternatives to graphql-query-complexity

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better graphql-query-complexity alternative or higher similarity.

graphql-query-complexity reviews and mentions

Posts with mentions or reviews of graphql-query-complexity. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-18.
  • Migrating Netflix to GraphQL Safely
    9 projects | news.ycombinator.com | 18 Jun 2023
    https://github.com/slicknode/graphql-query-complexity

    In addition you could introduce CI tools to enforce your devs stop writing such complex queries. Also see the @skip and @include directives that can further be used to control what data is queried. In practice, however, this isn't something that comes up too much. In cases where I have seen this happen, it's usually because a developer is trying to reuse fragments without considering what data they are querying, and whether they should be reusing those fragments.

    https://graphql.org/learn/queries/#fragments

  • GraphQL DoS amount-attack "breadth"
    2 projects | /r/graphql | 11 Jun 2023
    very cool! I was looking at https://github.com/slicknode/graphql-query-complexity
  • Preventing GraphQL batching attacks
    4 projects | dev.to | 7 Feb 2022
    There are a couple of techniques that can be used to prevent this kind of problem one of them is GraphQL Query Complexity Analysis which is, as the name suggests, very complex to implement correctly. It requires analysis of how the graphql API is used, and what queries and mutations are most often called. If you get this wrong, there is a danger of the server denying perfectly valid queries.
  • To GraphQL or not to GraphQL? Pros and Cons
    5 projects | dev.to | 13 Sep 2021
    The problem is that those queries are not prevented by commonly available rate limiters. You can send a single request to a GraphQL server that completely overwhelms the servers. To prevent such queries to GraphQL APIs, I wrote graphql-query-complexity, an extensible open-source library that detects such queries and rejects pathological queries before consuming too many resources on the server. You can assign each field a complexity value, and queries that exceed a threshold will be rejected. In Slicknode this protection is added automatically based on the number of nodes that are being returned.
  • A note from our sponsor - WorkOS
    workos.com | 26 Apr 2024
    The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →

Stats

Basic graphql-query-complexity repo stats
4
681
0.0
7 months ago

Sponsored
The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
workos.com