Skip to content
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

GraphQLError: switch constructor overload order #3514

Merged

Commits on Mar 18, 2022

  1. GraphQLError: switch constructor overload order

    The GraphQLError constructor has two overloads. The GraphQLErrorArgs one
    is recommended and the one with a bunch of position arguments is
    deprecated.
    
    When typechecking, TypeScript chooses the *first* matching overload (see
    eg
    microsoft/TypeScript#1860 (comment)).
    Passing just a message argument matches both overloads, so this
    currently displays as deprecated.
    
    This PR reverses the order so that passing just a message does not
    display as deprecated.
    glasser committed Mar 18, 2022
    Copy the full SHA
    a34e553 View commit details
    Browse the repository at this point in the history