graphql-scalar-objectid
v0.1.2
Published
GraphQLObjectId - GraphQL scalar for mongodb ObjectId
Downloads
6,654
Maintainers
Readme
GraphQLObjectId
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
}
}
})