Skip to content

Consider renaming INVALID to Undefined #77

Closed

Description

@Cito

GraphQL-Core-Next introduced the INVALID singleton to specify invalid and undefined values in places where GraphQL.js uses the global undefined which is only available in JavaScript. GraphQL-Core later introduced Undefined for the same purpose.

I'm inclined to use the same name Undefined in GraphQL-Core-Next, in order to maintain better backward compatibility with v2, and because it is more similar to GraphQL.js and maye more Python, since the None singleton, and False and True are also spelled as a capitalized words in Python. I would keep INVALID as an alias for backward compatibility with previous releases of v3.

Activity

  1. jkimbo commented on Jan 29, 2020

    @jkimbo
    Member

    +1 to this change. It makes sense to keep the naming similar to the reference library.

    As an aside if this change happens soon then we could move graphene to use Undefined instead of INVALID before v3 goes out.

  2. Cito commented on Jan 29, 2020

    @Cito
    MemberAuthor

    If we agree to do this, I could create a patch release in the 3.0.x branch (corresponding to GraphQL.js 14) with Undefined as alias for INVALID so this could be already used in Graphene. In the 3.1.x branch (corresponding to GraphQL.js 15) it will then be the other way around, INVALID will be an alias for Undefined and considered deprecated.

  3. Cito commented on Feb 2, 2020

    @Cito
    MemberAuthor

    Version 3.0.3 exporting Undefined as a forward compatible alias for INVALID has been released now. In version 3.1, INVALID will be still available, but considered deprecated.

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