@codeftw/future-web-graphql-date-time-resolver
v1.0.6
Published
[![npm version](https://badge.fury.io/js/%40codeftw%2Ffuture-web-graphql-date-time-resolver.svg)](https://badge.fury.io/js/%40codeftw%2Ffuture-web-graphql-date-time-resolver)
Downloads
72
Readme
Date Time Resolver for GraphQL
Installation
npm install @codeftw/future-web-graphql-date-time-resolver
Usage
- Add scalar DateTime to your Schema
scalar DateTime
type Query {
...
}
type Mutation {
...
}
- Import it in your resolvers and define it
import { resolverDateTime } from '@codeftw/future-web-graphql-date-time-resolver';
export const resolvers = {
Query: {
...
},
Mutation: {
...
},
DateTime: resolverDateTime,
};
- Use it in your types, queries, mutations
type Person {
name: String
birthday: DateTime
}