Skip to content

Commit c5848d9

Browse files
2 parents 45a6304 + c5fa5a2 commit c5848d9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# GraphQL Custom Data Types
2+
Custom GraphQL Types, such as Date and Cursor
3+
4+
## Install
5+
`yarn add @limit-zero/graphql-custom-types`
6+
7+
## Usage
8+
Within your root resolver file, require the types and add them to the tree, similar to the following:
9+
```js
10+
const { DateType, CursorType } = require('@limit-zero/graphql-custom-types');
11+
12+
const resolvers = {
13+
Date: DateType,
14+
Cursor: CursorType,
15+
};
16+
```
17+
18+
Also, don't forget to add them to your GraphQL definitions:
19+
```graphql
20+
scalar Date
21+
scalar Cursor
22+
```

0 commit comments

Comments
 (0)