-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Apollo Error Code lost when using mergeSchemas #1582
Comments
I've opened bug in |
Resolved for me after importing "extractExtensionDefinitions". ardatan/graphql-tools#1037 (comment) |
Is there a fix for this? We are providing some more information besides |
@robertontiu I don't believe there's fix for this yet. Would it be something you'd be interested in looking into? I suspect (though I'm not certain; debugging would be required), the problem lies in the There are different forms of schemas that |
Quick note - the original reproduction listed here no longer fails when using a modern day version of I'll work on addressing this in |
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
This is fixed in newer versions |
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
Use new relocatedError function to update the original GraphQLErrors with the new path. Addresses ardatan#743, ardatan#1037, ardatan#1046, apollographql/apollo-server#1582.
It still seems to be a thing #4807 |
As mentioned on #4807, mergeSchemas is part of graphql-tools; the old version "conveniently" re-exported from Apollo Server is not maintained. |
It is expected that the error codes and other error extensions maintain themselves when returning to the client. When using mergeSchemas, when a custom error is thrown using ApolloError, the error code is lost. Although it's understandable why this might happen when merging remote schemas, this even happens with local schemas. An example server (or set of servers) and example curl requests show the difference in results:
To reproduce, run:
Put the following into
index.js
:index.js
Then run
NODE_ENV=production node index
(production to suppress stack trace from output).After that, run the following curl commands and you'll get the respective results:
response
response
Perhaps this is as designed, but it would be awesome if there was a way to propagate error codes up through the mergeSchemas "firewall".
The text was updated successfully, but these errors were encountered: