Skip to content

Releases: slicknode/graphql-query-complexity

v1.1.0

08 Apr 02:13
Compare
Choose a tag to compare

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

11 Jun 00:32
Compare
Choose a tag to compare

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

29 Aug 12:13
fa1f9d5
Compare
Choose a tag to compare

New

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

Fixes

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

v0.11.0

08 Nov 23:36
Compare
Choose a tag to compare

Breaking

  • Drop support for GraphQL < v14.6

New

  • Add support for GraphQL JS v16
  • ESM module support

v0.10.0

28 Oct 20:38
Compare
Choose a tag to compare

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

09 Aug 17:41
Compare
Choose a tag to compare

New Features

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

v0.8.1

04 May 19:19
Compare
Choose a tag to compare

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

18 Mar 12:53
Compare
Choose a tag to compare

New Features

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

v0.7.1

01 Nov 14:31
Compare
Choose a tag to compare

Fixes

  • Fix issue with fields with optional directive property #34

v0.7.0

12 Aug 23:20
Compare
Choose a tag to compare

New Features

  • Handle complexity of abstract types (Union, Interface) by returning the maximum possible complexity for a field instead of the sum of the entire selection set, fixes #26