Closed shalarewicz closed 2 years ago
Reassess this after updates to code base in PR #66
After the refactor in #66, this occurs if an invalid parentName
is provided when obtaining a resolvedTypeName
in the fieldNode
function. Temporarily fixing this in work on #44 by throwing an error if the parentName
doesn't exist on typeWeights either due to capitalization or an invalid query (the latter case should be caught during schema validation).
We'll need to decide on how to handle this in a production environment.
If the
fieldWeight
is undefined during complexity analysis then an unhandled error is thrown. These errors should be handled in development environments to provide clarity on why thefieldWeight
is undefined. Production environments should attempt to default to a logical complexity value.