-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Top-level errors path
field has incorrect value in case of nested service call
#354
Comments
I believe it is important to comply with the specs here. From the perspective of the client it should be transparent that a request is going through a gateway. I hope you can consider this issue and thank you for all the hard work! |
Is there any update on moving this forward? It is critical (as already mentioned above) that the response comply with the GraphQL spec, since all the tooling are built around that. I've started digging into it, but with the current federation implementation it seem tricky to achieve it. Some thoughtsFirstly i needed to identify where it makes more sense to fix this issue, in the federated service or the gateway? With the current understanding that i have, it might be pretty difficult to fix it at the federated service level, since, it has no knowledge of where the So i thought that the I was trying to find a way of mapping back the errors to the right path comparing the initial selection set with the response of the i'm not very close with a working solution, still trying to figure out some code paths and thoughts behind the federation implementation. If you have some advise i'd be glad to take this forward or at least help in some way 😄 Obviously a big thanks for the work you are all doing. |
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Previously, errors with invalid or missing paths were lost. See: #1641 https://github.com/apollographql/apollo-server/issues/4226 They are now saved! All correctly pathed errors are now inlined into the returned data by the CheckResultAndHandleErrors transform. The data is now annotated only with the remaining "unpathed" errors. These are then returned when possible if a null is encountered including the missing or potentially invalid path. Changes to error handling obviate some existing functions including getErrorsByPathSegment, getErrors in favor of getUnpathedErrors. Utility functions including slicedError and unreleased functions extendedError and unextendedError are no longer necessary.
Is there any word on this? Or a work around anyone has come up with? Cheers! |
My first look at the code, but it seems something could be done in this method to map the error paths: federation/gateway-js/src/executeQueryPlan.ts Line 192 in 8131012
|
Howdy to everyone following this issue! We're planning on rolling this into the |
Hi @benweatherman ! Do you have an ETA to share when the Thank you very much! |
Howdy @EXPEylazzari! No ETA yet on when this will release, but it's the next feature we're working on. Once it's finished, it'll go into whatever the next release is. For more context, our main focus for TL;DR we're working on this next and it'll be released in whatever version follows its completion. |
Hi all! We recently fixed this issue in #2304, which has been delivered in Federation v2.3. With that, I'll be closing this issue, but feel free to open any new issues if your use cases are not fully met. Thanks! |
master
and latest versionsname
field inaccounts
schemaexpect(response).toHaveProperty('errors.0.path', ['topReviews', 7, 'author', 'name'])
["_entities", 7, "name"]
cd packages/apollo-gateway && npx jest src/__tests__/executeQueryPlan.test.ts
errors.*.path
field should comply with graphql specs https://spec.graphql.org/June2018/#sec-ErrorsThe text was updated successfully, but these errors were encountered: