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

Using bigint primary keys results in a serialisation issue at runtime #1355

Open
thekevinbrown opened this issue Nov 19, 2024 · 0 comments
Open

Comments

@thekevinbrown
Copy link
Member

Describe the bug
When you use bigint primary keys everything works until we pass the data over to the graphql reference implementation:

"message":"ID cannot represent value: 1","stack":"GraphQLError: ID cannot represent value: 1\n    at GraphQLScalarType.serialize ([project directory]/node_modules/.pnpm/[email protected]/node_modules/graphql/type/scalars.js:301:11)

To Reproduce

Create a table as follows:

CREATE TABLE test (
    id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    note text
);

Then populate some data in the table. Query the values from the table.

Expected behavior
Expected functional query response.

Actual behavior
Error

Additional context
It looks like they're not going to coerce these values for us: graphql/graphql-js#3913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant