Skip to content

lgaticaq/graphql-type-ms

Repository files navigation

graphql-type-ms

npm version npm downloads Build Status Coverage Status Maintainability devDependency Status

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)
};

Licencia

MIT

About

ms scalar type for GraphQL.js

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published