graphql-type-ms
v1.0.0
Published
ms scalar type for GraphQL.js
Downloads
75
Readme
graphql-type-ms
ms scalar type for GraphQL.js
Installation
npm i graphql-type-ms
Use
const GraphQLMS = require("graphql-type-ms");
const ms = require("ms");
const { GraphQLNonNull, GraphQLInt } = require("graphql/type");
exports.myMutation = {
type: GraphQLInt,
args: {
expire: {
type: new GraphQLNonNull(GraphQLMS),
description: "Identificador del Usuario"
}
},
resolve: (root, { expire }) => ms(expire)
};