graphql/envelop/plugins/use-error-handler #1751
Replies: 2 comments 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
0 replies
-
The export declare function isGraphQLError(error: unknown): error is Error & {
originalError?: Error;
}; So if you would want to create another error check to see if it has extensions errors, this would cause the typing to fail because function isGraphQLErrorExtensions(error: unknown): error is GraphQLError & {
extensions: NonNullable<GraphQLError['extensions']>;
} {
return (
isGraphQLError(error) &&
error.extensions !== null &&
error.extensions !== undefined &&
typeof error?.extensions === 'object'
);
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
graphql/envelop/plugins/use-error-handler
GraphQL Envelop Documentation
https://the-guild.dev/graphql/envelop/plugins/use-error-handler
Beta Was this translation helpful? Give feedback.
All reactions