Gathering detailed insights and metrics for graphql-scalar-int53
Gathering detailed insights and metrics for graphql-scalar-int53
Gathering detailed insights and metrics for graphql-scalar-int53
Gathering detailed insights and metrics for graphql-scalar-int53
npm install graphql-scalar-int53
Typescript
Module System
Node Version
NPM Version
67.7
Supply Chain
91.2
Quality
74.8
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
11 Commits
1 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Feb 24, 2021
Latest Version
1.0.0
Package Id
graphql-scalar-int53@1.0.0
Size
3.01 kB
NPM Version
5.4.2
Node Version
6.12.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
GraphQL Int53 is a scalar that matches the behavior of the Int type,
but with a range from -(2**53 - 1)
to 2**53 - 1
. This corresponds to
the safe integer range of an IEEE 754 double precision binary
floating-point value.
It is meant as a direct alternative to GraphQL Int, which represents a
signed 32‐bit numeric non‐fractional value and supports values with a
range from -(2**31)
to 2**31 - 1
.
There are numerous places where integral values exceed 2 billion:
fileSizeInBytes
(files larger than 2 gigabytes)millisecondsSinceEpoch
(such as JavaScript/Java Date.getDate()
)secondsSinceEpoch
(after 2038, Year 2038 Problem)freeMemoryInBytes
(RAM larger than 2 gigabytes)monetaryAmount
(as defined by ISO 4217)databaseRowId
(more than 2 billion database rows)youtubeVideoViewCount
(currently over 20 videos have this)facebookMonthlyActiveUserCount
(reaching over 2 billion)These values could be represented by Float
, but that would be
confusing as they are integers, and would be inefficient in
programming languages where there is a natural 64-bit integer type.
They could also be represented by String
, but that would mean an
additional parsing and validation step. These values could also be
represented by a 64-bit integer, but that would be problematic for
JavaScript, Lua and other languages which use an IEEE 754 double
precision binary floating-point value as their primary number type.
While somewhat unconventional, the 53-bit integer is a "least common denominator" type that can easily be supported by all programming languages.
1npm install --save graphql-scalar-int53
1import { graphql, buildSchema } from 'graphql'; 2import GraphQLInt53 from 'graphql-scalar-int53'; 3 4const schema = buildSchema(` 5scalar Int53 6type Query { 7 output: Int53 8 inputVariable(value: Int53): Int53 9 inputLiteral(value: Int53): Int53 10} 11`); 12 13const query = ` 14query ($value: Int53) { 15 output 16 inputVariable(value: $value) 17 inputLiteral(value: 9876504321) 18} 19`; 20 21const root = { 22 output: 9876504322, 23 inputVariable: ({value}) => value, 24 inputLiteral: ({value}) => value, 25} 26 27graphql(schema, query, root, null, {value: 98765043223}).then(console.log); 28 29// Outputs: 30// { data: 31// { output: 9876504322, 32// inputVariable: 98765043223, 33// inputLiteral: 9876504321 } }
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/11 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
57 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More