https://github.com/limit-zero/graphql-custom-types
Custom GraphQL Types, such as Date and Cursor
https://github.com/limit-zero/graphql-custom-types
graphql nodejs types
Last synced: 4 months ago
JSON representation
Custom GraphQL Types, such as Date and Cursor
- Host: GitHub
- URL: https://github.com/limit-zero/graphql-custom-types
- Owner: limit-zero
- License: mit
- Created: 2018-05-03T21:17:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-01T17:38:27.000Z (over 3 years ago)
- Last Synced: 2025-09-28T04:55:17.654Z (9 months ago)
- Topics: graphql, nodejs, types
- Language: JavaScript
- Size: 33.2 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GraphQL Custom Data Types
Custom GraphQL Types, such as Date and Cursor
## Install
`yarn add @limit0/graphql-custom-types`
## Usage
Within your root resolver file, require the types and add them to the tree, similar to the following:
```js
const { DateType, CursorType } = require('@limit0/graphql-custom-types');
const resolvers = {
Date: DateType,
Cursor: CursorType,
};
```
Also, don't forget to add them to your GraphQL definitions:
```graphql
scalar Date
scalar Cursor
```