{"_id":"graphql-bigint","_rev":"1-043c06ff31b32126077d79636c03ffed","name":"graphql-bigint","description":"A 53-bit wide implementation of integers for GraphQL","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"graphql-bigint","version":"1.0.0","description":"A 53-bit wide implementation of integers for GraphQL","main":"index.js","peerDependencies":{"graphql":"*"},"devDependencies":{"chai":"^4.1.0","graphql":"^0.10.5","nyc":"^11.0.3"},"scripts":{"test":"nyc node ./test.js"},"repository":{"type":"git","url":"git+https://github.com/stems/graphql-bigint.git"},"keywords":["graphql","int","bigint","long","number"],"author":{"name":"acarl005","email":"acarl005@g.ucla.edu"},"license":"MIT","bugs":{"url":"https://github.com/stems/graphql-bigint/issues"},"homepage":"https://github.com/stems/graphql-bigint#readme","gitHead":"4d89a0f5f32ad4f0825c91d607b8b61f85cd9bbf","_id":"graphql-bigint@1.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.1.3","_npmUser":{"name":"acarl005","email":"acarl005@g.ucla.edu"},"dist":{"integrity":"sha512-eLDf9GinU0ioui1ipXCl7pMFa3Am8pxciS0D0LR68SXfY7EzLk5P58LKyk+7CgLD5f66kiFGa5OIqt6iRLE2cQ==","shasum":"b2909be9c9970a9a7697273c27d0ea47a146a19c","tarball":"https://registry.npmjs.org/graphql-bigint/-/graphql-bigint-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD89S34yh4aWFllKx8obch67dIFuQVVpF4k99S9sZNfzQIgdECZ2gzmSryMfnwnYiEu10qoYU16cSap/S5BooCZwN4="}]},"maintainers":[{"name":"acarl005","email":"acarl005@g.ucla.edu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-bigint-1.0.0.tgz_1501115889183_0.49282784876413643"}}},"readme":"graphql-bigint\n=============\n\nA wider integer type for [graphql-js](https://github.com/graphql/graphql-js) than the default 32-bit `GraphQLInt`. This implementation gives you 53-bit integers.\n\n## The problem\n\nThe GraphQL spec limits its `Int` type to 32-bits. Maybe you've seen this error before:\n\n```\nGraphQLError: Argument \"num\" has invalid value 9007199254740990.\n              Expected type \"Int\", found 9007199254740990.\n```\n\nWhy? 64-bits would be too large for JavaScript's 53-bit limit. According to Lee Byron, a 52-bit integer spec would have been \"too weird\" [see this issue](https://github.com/graphql/graphql-js/issues/292).\n\n## Usage\n\n```shell\n$ npm install graphql-bigint\n```\n\nUse it the same as any other scalar type, either input or output.\n\n```js\nconst BigInt = require('graphql-bigint')\n\nconst SomeType = new GraphQLObjectType({\n  name: 'SomeType',\n  fields: {\n    numberField: {\n      type: BigInt,\n      // this would throw an error with the GraphQLInt\n      resolve: () => Number.MAX_SAFE_INTEGER \n    }\n  }\n})\n```\n\n","maintainers":[{"name":"acarl005","email":"acarl005@g.ucla.edu"}],"time":{"modified":"2022-05-04T02:43:19.950Z","created":"2017-07-27T00:38:09.276Z","1.0.0":"2017-07-27T00:38:09.276Z"},"homepage":"https://github.com/stems/graphql-bigint#readme","keywords":["graphql","int","bigint","long","number"],"repository":{"type":"git","url":"git+https://github.com/stems/graphql-bigint.git"},"author":{"name":"acarl005","email":"acarl005@g.ucla.edu"},"bugs":{"url":"https://github.com/stems/graphql-bigint/issues"},"license":"MIT","readmeFilename":"README.md"}