ms scalar type for GraphQL.js
npm i graphql-type-ms
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)
};