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

Use a custom type for big integers #328

Merged
merged 2 commits into from Feb 11, 2017
Merged

Use a custom type for big integers #328

merged 2 commits into from Feb 11, 2017

Conversation

calebmer
Copy link
Collaborator

@calebmer calebmer commented Jan 28, 2017

Fixes #302

This PR makes it so that PostGraphQL no longer uses the native GraphQL Int type to represent big integers (as a big integer can be larger than Int allows). So instead we now have a BigInt type which serializes and deserializes as a string. It is a string because in JavaScript a big integer can be larger than what a number supports. To get around that limitation all big integers will be strings. If you’d like you can parse big integers on the client.

This is a breaking change I’ve wanted to make for a while, so now that we need a breaking change for #327 I want to get this change into 3.x as well.

Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@benjie benjie changed the base branch from master to next January 28, 2017 21:35
@calebmer calebmer mentioned this pull request Feb 8, 2017
@calebmer calebmer merged commit d9f697b into next Feb 11, 2017
@calebmer calebmer deleted the fix/bigint branch February 11, 2017 15:44
calebmer added a commit that referenced this pull request Feb 11, 2017
* use custom string type for big integers

* use breaking case for bigint
Belline pushed a commit to Belline/postgraphql that referenced this pull request Dec 18, 2017
* use custom string type for big integers

* use breaking case for bigint
benjie added a commit that referenced this pull request Jan 27, 2020
```js
const options = {
  graphileBuildOptions: {
    pgSkipInstallingWatchFixtures: true,
  }
};
```
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.

None yet

2 participants