Custom GraphQL Types


101.0.13 years ago3 years agoMinified + gzip package size for @limit0/graphql-custom-types in KB


GraphQL Custom Data Types

Custom GraphQL Types, such as Date and Cursor


yarn add @limit0/graphql-custom-types


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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.