graphql-scalar-objectid

GraphQLObjectId - GraphQL scalar for mongodb ObjectId

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
graphql-scalar-objectid
1590.1.25 years ago6 years agoMinified + gzip package size for graphql-scalar-objectid in KB

Readme

GraphQLObjectId
Build Status Coverage Status npm
GraphQL scalar type for mongodb ObjectId.

Example

const { GraphQLObjectType, GraphQLString } = require('graphql')
const GraphQLObjectId = require('graphql-scalar-objectid')

const UserType = new GraphQLObjectType({
  name: 'User',
  fields: {
    _id: {
      type: GraphQLObjectId
    },
    name: {
      type: GraphQLString
    }
  }
})