Skip to content

Can we align GraphQLError to utilize Error.cause? #4484

Description

@Malien

ECMAScript has standardized around new Error(message, { cause }) pattern. We have the originalError option. I'd hope we could alias and deprecate originalError in favor of cause to bring uniformity.

Maybe do a super(message, { cause }) call?
Maybe do a Object.defineProperty?

And I also guess the cause is not necessarily is an Error, but is unknown per spec.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions