This repository has been archived by the owner on Apr 15, 2020. It is now read-only.
forked from ardatan/graphql-tools
null error annotating children with errors at stitching #26
Comments
Fix only passes along the error if schemas is changed to
|
Does that work for now? I believe total fix requires wrapping stitched result instead of annotating it, because you can't annotate null, we get around that by throwing for fields immediately when null, but doesn't work with lists. |
Thank you! The fix works as you've described. |
yaacovCR
added a commit
that referenced
this issue
Nov 7, 2019
Merged results that are null may carry errors from deeper within the query tree. Previous merged result format carries this metadata within a property on the result, but null has no properties. New result format differs only in that a null result is transformed to an object with a special property signifying that the result was null, so that metadata can be added in the same way. When merging within defaultMergedResolver, all null checks must check for this property as well. Because a result may be changed during annotation, the function is essentially no longer annotating only/i.e. modifying the object in place, and so it has been renamed to reflect that, with forEach changed to map when processing a list. Fixes #26.
yaacovCR
added a commit
that referenced
this issue
Nov 7, 2019
Merged results that are null may carry errors from deeper within the query tree. Previous merged result format carries this metadata within a property on the result, but null has no properties. New result format differs only in that a null result is transformed to an object with a special property signifying that the result was null, so that metadata can be added in the same way. When merging within defaultMergedResolver, all null checks must check for this property as well. Because a result may be changed during annotation, the function is essentially no longer annotating only/i.e. modifying the object in place, and so it has been renamed to reflect that, with forEach changed to map when processing a list. Fixes #26.
Should be fixed for reals now in 7.1.2. |
yaacovCR
added a commit
that referenced
this issue
Dec 31, 2019
Merged results that are null may carry errors from deeper within the query tree. Previous merged result format carries this metadata within a property on the result, but null has no properties. New result format differs only in that a null result is transformed to an object with a special property signifying that the result was null, so that metadata can be added in the same way. When merging within defaultMergedResolver, all null checks must check for this property as well. Because a result may be changed during annotation, the function is essentially no longer annotating only/i.e. modifying the object in place, and so it has been renamed to reflect that, with forEach changed to map when processing a list. Fixes #26.
yaacovCR
added a commit
that referenced
this issue
Dec 31, 2019
Merged results that are null may carry errors from deeper within the query tree. Previous merged result format carries this metadata within a property on the result, but null has no properties. New result format differs only in that a null result is transformed to an object with a special property signifying that the result was null, so that metadata can be added in the same way. When merging within defaultMergedResolver, all null checks must check for this property as well. Because a result may be changed during annotation, the function is essentially no longer annotating only/i.e. modifying the object in place, and so it has been renamed to reflect that, with forEach changed to map when processing a list. Fixes #26.
yaacovCR
added a commit
that referenced
this issue
Jan 8, 2020
Merged results that are null may carry errors from deeper within the query tree. Previous merged result format carries this metadata within a property on the result, but null has no properties. New result format differs only in that a null result is transformed to an object with a special property signifying that the result was null, so that metadata can be added in the same way. When merging within defaultMergedResolver, all null checks must check for this property as well. Because a result may be changed during annotation, the function is essentially no longer annotating only/i.e. modifying the object in place, and so it has been renamed to reflect that, with forEach changed to map when processing a list. Fixes #26.
yaacovCR
added a commit
that referenced
this issue
Jan 21, 2020
Merged results that are null may carry errors from deeper within the query tree. Previous merged result format carries this metadata within a property on the result, but null has no properties. New result format differs only in that a null result is transformed to an object with a special property signifying that the result was null, so that metadata can be added in the same way. When merging within defaultMergedResolver, all null checks must check for this property as well. Because a result may be changed during annotation, the function is essentially no longer annotating only/i.e. modifying the object in place, and so it has been renamed to reflect that, with forEach changed to map when processing a list. Fixes #26.
yaacovCR
added a commit
that referenced
this issue
Feb 27, 2020
Merged results that are null may carry errors from deeper within the query tree. Previous merged result format carries this metadata within a property on the result, but null has no properties. New result format differs only in that a null result is transformed to an object with a special property signifying that the result was null, so that metadata can be added in the same way. When merging within defaultMergedResolver, all null checks must check for this property as well. Because a result may be changed during annotation, the function is essentially no longer annotating only/i.e. modifying the object in place, and so it has been renamed to reflect that, with forEach changed to map when processing a list. Fixes #26.
yaacovCR
added a commit
that referenced
this issue
Mar 26, 2020
Merged results that are null may carry errors from deeper within the query tree. Previous merged result format carries this metadata within a property on the result, but null has no properties. New result format differs only in that a null result is transformed to an object with a special property signifying that the result was null, so that metadata can be added in the same way. When merging within defaultMergedResolver, all null checks must check for this property as well. Because a result may be changed during annotation, the function is essentially no longer annotating only/i.e. modifying the object in place, and so it has been renamed to reflect that, with forEach changed to map when processing a list. Fixes #26.
yaacovCR
added a commit
that referenced
this issue
Mar 26, 2020
Merged results that are null may carry errors from deeper within the query tree. Previous merged result format carries this metadata within a property on the result, but null has no properties. New result format differs only in that a null result is transformed to an object with a special property signifying that the result was null, so that metadata can be added in the same way. When merging within defaultMergedResolver, all null checks must check for this property as well. Because a result may be changed during annotation, the function is essentially no longer annotating only/i.e. modifying the object in place, and so it has been renamed to reflect that, with forEach changed to map when processing a list. Fixes #26.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm using graphql-tools-fork v7.0.3
NodeJS v12.8.1, tried also on v13.0.1
I have a following schema:
If I by error don't fill mandatoryField, then annotateWithChildrenErrors will fail with error:
After validation to annotateWithChildrenErrors comes
object
:And
childrenErrors
:As error will be relocated it will reach such state when
object
isnull
andchildrenErrors
will still be an array - this will lead to null exception on line 73.I've checked the code - v7.1.0 does not have it fixed.
The text was updated successfully, but these errors were encountered: