Skip to content

Support for bigint in ID #3913

Open
Open
@vwkd

Description

@vwkd

It's desirable to represent an ID on the server as a bigint instead of a number.

Currently, the ID scalar type supports serializing number to string, but not bigint.

I'd like to see support for serialization of bigint to string similar to number.

I think it would require changing this code

if (Number.isInteger(coercedValue)) {
return String(coercedValue);
}
to

if (Number.isInteger(coercedValue) || typeof coercedValue == "bigint") { 
  return String(coercedValue); 
}

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