https://github.com/up9cloud/graphql-tools-type-int64
Int64 scalar type for [graphql-tools](https://github.com/apollographql/graphql-tools)
https://github.com/up9cloud/graphql-tools-type-int64
Last synced: 5 months ago
JSON representation
Int64 scalar type for [graphql-tools](https://github.com/apollographql/graphql-tools)
- Host: GitHub
- URL: https://github.com/up9cloud/graphql-tools-type-int64
- Owner: up9cloud
- License: mit
- Created: 2018-03-29T14:20:30.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-08-02T11:19:33.000Z (almost 5 years ago)
- Last Synced: 2025-09-22T14:35:30.092Z (9 months ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# graphql-tools-type-int64
[](https://travis-ci.org/up9cloud/graphql-tools-type-int64)
[](https://coveralls.io/github/up9cloud/graphql-tools-type-int64?branch=master)
Int64 scalar type for [graphql-tools](https://github.com/apollographql/graphql-tools)
> This is not actually 64-bit!
> Because javascript safe integers are between -(2^53 - 1) and 2^53 - 1,
> see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger.
## Usage
```js
import { makeExecutableSchema } from 'graphql-tools'
// import Int64 from 'graphql-tools-type-int64'
import Int64 from 'graphqltoolstypeint64' // naming: because of npm spam detection
let typeDefs = [`
scalar Int64
type Query {
value(v: Int64): Int64
}`
]
let resolvers = {
Int64,
Query: {
value: (root, { v }) => v
}
}
let schema = makeExecutableSchema({ typeDefs, resolvers })
export default schema
```