Skip to content

Increased MAX_INT and MIN_INT to +(2^53 - 1) and -(2^53 - 1) #1375

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

Closed
wants to merge 1 commit into from

Conversation

jackton1
Copy link

@jackton1 jackton1 commented Sep 27, 2021

Seems the comment uses the MAX_SAFE_INTEGER which should be 2^53 - 1 instead of 2^32 - 1.

graphql/graphql-spec#73

This might be platform dependent so switching to use sys.maxsize might be an alternative.

@syrusakbary

@jackton1 jackton1 changed the title Increased MAX_INT and MIN_INT to 2^53 - 1 Increased MAX_INT and MIN_INT to +(2^53 - 1) and -(2^53 - 1) Sep 27, 2021
@erikwrede
Copy link
Member

erikwrede commented Sep 2, 2022

Using the custom BigInt Scalar is the preferred solution for this problem.
Everything else breaks spec:
https://spec.graphql.org/June2018/#sec-Int

@erikwrede erikwrede closed this Sep 2, 2022
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

Successfully merging this pull request may close these issues.

2 participants