Skip to content

Releases: slicknode/graphql-query-complexity

v1.1.1

Choose a tag to compare

@ivome ivome released this 12 Jun 02:07

Fixes

  • Circular fragment references: Skip fragment spreads that would re-enter a fragment already on the active path, preventing infinite recursion during complexity analysis. Acyclic queries are unchanged; only the back-edge of a cycle is ignored when computing complexity.

Credits: @tonghuaroot

v1.1.0

Choose a tag to compare

@ivome ivome released this 08 Apr 02:13

Breaking

  • There is a new default limit of 10000 query nodes. Queries with more than 10k query nodes (fields, fragments, etc.) will be rejected. This should be enough for the overwhelming majority of cases, but can be configured via maxQueryNodes. #98

Features

  • Users can configure maxQueryNodes to configure the maximum number of allowed query nodes that will be evaluated. #98

Fixes

  • CSJ and ESM versions of the library should now work without adjustments, fixes #93
  • Limiting the maximum number of query nodes fixes a critical security vulnerability that can render a GraphQL server unresponsive for complex and deeply nested queries.

v1.0.0

Choose a tag to compare

@ivome ivome released this 11 Jun 00:32

Breaking

  • GraphQL introspection fields are now evaluated as well. #92 This might increase the complexity of queries compared to the previous version. To achieve backwards compatible functionality, you can add an estimator as the first estimator in the chain that returns 0 for introspection fields.

Fixes

  • Fix issues with dual module support #75
  • Return 0 complexity for unsupported GraphQL operations #89

v0.12.0

Choose a tag to compare

@ivome ivome released this 29 Aug 12:13
fa1f9d5

New

  • Adds support for passing the execution context to estimators #77 (thanks @hayes)

Fixes

  • Report variable coercion errors #78 (fixes #69)

v0.11.0

Choose a tag to compare

@ivome ivome released this 08 Nov 23:36

Breaking

  • Drop support for GraphQL < v14.6

New

  • Add support for GraphQL JS v16
  • ESM module support

v0.10.0

Choose a tag to compare

@ivome ivome released this 28 Oct 20:38

Breaking:

  • Support for GraphQL version < v14.5 was dropped
  • getComplexity now throws an error if the query complexity cannot be determined (invalid query, misconfiguration, etc.)

Fixes:

  • Invalid argument values in a query now have proper error handling (fixes #61 ) Thanks @dburles

v0.9.0

Choose a tag to compare

@ivome ivome released this 09 Aug 17:41

New Features

  • Compiles code into ES Modules as well as common JS modules (#37)
  • Adds createComplexityRule named export to main package

v0.8.1

Choose a tag to compare

@ivome ivome released this 04 May 19:19

Fixes

  • Adds support for default values of query variables. Fixes #50

Improvements

  • Add prettier code formatting
  • Simplify eslint rules
  • FIx linter setup

v0.8.0

Choose a tag to compare

@ivome ivome released this 18 Mar 12:53

New Features

  • The GraphQL node is now available inside of the estimator #46

v0.7.1

Choose a tag to compare

@ivome ivome released this 01 Nov 14:31

Fixes

  • Fix issue with fields with optional directive property #34