envelop icon indicating copy to clipboard operation
envelop copied to clipboard

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

Open n1ru4l opened this issue 4 years ago • 0 comments

Executing the following document:

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 (<anonymous>)
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 (<anonymous>)
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 (<anonymous>)
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 (<anonymous>)
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?

n1ru4l avatar Aug 16 '21 12:08 n1ru4l