graphql-hive / graphql-hive/envelop

[depth-limit] causes leaking of internal error when undefined fragment is referenced

Open
#571 0 comments 1 reaction 0 assignees View on GitHub
kind/bug
Dominant language
No language data
Stars
827
Forks
132
PR merge metrics
No merged PRs in 30d

Description

Executing the following document:

```graphql
query {
...SomeNonExistingFragment
}
```

Results in the following error:

```
TypeError: Cannot read property 'kind' of undefined
at determineDepth (/app/node_modules/graphql-depth-limit/index.js:60:16)
at determineDepth (/app/node_modules/graphql-depth-limit/index.js:72:14)
at /app/node_modules/graphql-depth-limit/index.js:69:9
at Array.map ()
at determineDepth (/app/node_modules/graphql-depth-limit/index.js:68:59)
at /app/node_modules/graphql-depth-limit/index.js:77:9
at Array.map ()
at determineDepth (/app/node_modules/graphql-depth-limit/index.js:76:55)
at /app/node_modules/graphql-depth-limit/index.js:69:9
at Array.map ()
at determineDepth (/app/node_modules/graphql-depth-limit/index.js:68:59)
at /app/node_modules/graphql-depth-limit/index.js:77:9
at Array.map ()
at determineDepth (/app/node_modules/graphql-depth-limit/index.js:76:55)
at /app/node_modules/graphql-depth-limit/index.js:22:27
at /app/node_modules/graphql/validation/validate.js:65:12
```

This is actually an issue with `graphql-depth-limit` - but given that it is not really maintained since 4 years we should maybe improve it and inline it?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.