@limit0/graphql-custom-types

1.0.2 • Public • Published

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

/@limit0/graphql-custom-types/

    Package Sidebar

    Install

    npm i @limit0/graphql-custom-types

    Weekly Downloads

    175

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    9.54 kB

    Total Files

    13

    Last publish

    Collaborators

    • solocommand
    • curthusting
    • zarathustra323