1.0.4 • Published 5 years ago

@uwatch/graphql-date v1.0.4

Weekly downloads
55
License
MIT
Repository
github
Last release
5 years ago

graphql-date Build Status js-standard-style

GraphQL Date Type

Installation

npm i --save graphql-date

Usage

var GraphQLDate = require('graphql-date')

// Use graphql-date in your GraphQL objects for Date properties
var fooType = new GraphQLObjectType({
  name: 'Foo',
  description: 'Some foo type',
  fields: {
    created: {
      type: GraphQLDate,
      description: 'Date foo was created'
    }
  }
});

var queryType = new GraphQLObjectType({
  name: 'Query',
  fields: {
    foo: {
      type: fooType,
      resolve: function () {
        // ...
      },
    }
  }
})

License

MIT