Skip to content

limit-zero/graphql-custom-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

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:

scalar Date
scalar Cursor

About

Custom GraphQL Types, such as Date and Cursor

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •