graphql-query-complexity
graphql-query-complexity copied to clipboard
GraphQL query complexity analysis and validation for graphql-js
Currently unused variables are ignored for the purposes of calculating complexity. However, because graphql-js's `getVariableValues` method returns either a map of "coersed" values, OR an array of errors, whenever directives...
I face this error. It seems due to the presence of extensions in import file names. The library generating my schema uses ".mjs" files of graphql module, whereas graphql-query-complexity uses...
There should be a possibility for an exponential complexity calculation. Our graphql data models have a lot of relations and most of these can return multiple entities. Therefore the depth...
Hey, I've encountered a bug when running mutations and providing an invalid input. Given the following schema ```graphql type Query { hello: String } input AddFavoriteFoodInput { id: ID! comment:...
Hi. I was wondering if it would make sense to add support for adding cost on the graphql types like this: ``` type Customer @complexity(value: 5){ name: String } type...
### What Update `QueryComplexity.ts` to count meta fields against total complexity. The current implementation only considers fields included in the schema, which omits: `__typename`, `__type` and `__schema`. ### Why Denial...
This fixes the `TypeError: Cannot read properties of undefined (reading 'name')` reported by #84 and #85. Defaulting to 0 complexity seems reasonable as we cannot reason about fields for which...
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. Release notes Sourced from word-wrap's releases. 1.2.4 What's Changed Remove default indent by @mohd-akram in jonschlinkert/word-wrap#24 🔒fix: CVE 2023 26115 (2) by @OlafConijn in...
Bumps [semver](https://github.com/npm/node-semver) from 7.3.5 to 7.5.2. Release notes Sourced from semver's releases. v7.5.2 7.5.2 (2023-06-15) Bug Fixes 58c791f #566 diff when detecting major change from prerelease (#566) (@lukekarrys) 5c8efbc #565...
Imagine we have an external service that we're calling out to in order to populate the `foo` array field. I can request any number of elements for that, but the...