graphql/envelop/plugins/use-error-handler #1751
Replies: 3 comments 4 replies
|
The |
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'
);
} |
3 replies
|
This really needs a lot more details. The type for errors: {
errors: readonly Error[] | readonly SerializableGraphQLErrorLike[];
context: Readonly<DefaultContext>;
phase: "parse" | "validate" | "context" | "execution";
}
|
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
graphql/envelop/plugins/use-error-handler
GraphQL Envelop Documentation
https://the-guild.dev/graphql/envelop/plugins/use-error-handler
All reactions