1.1.2 • Published 12 months ago

graphql-type-object-id-no-deps v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

built with typescript-lib-starter

graphql-type-object-id-no-deps

MongoDB ObjectId scalar type for GraphQL.js.

## Installation

$ npm i graphql-type-object-id-no-deps

Or

$ yarn add graphql-type-object-id-no-deps

Usage

Import the type:

import GraphQLObjectId from 'graphql-type-object-id-no-deps';

Or

import { GraphQLObjectId } from 'graphql-type-object-id-no-deps';

In your schema

You can use this in a programmatically-constructed schema as with any other scalar type:

import { makeExecutableSchema } from '@graphql-tools/schema';
import GraphQLObjectId from 'graphql-type-object-id-no-deps';

const typeDefs = `
  scalar ObjectId
  # ...
`;

const resolvers = {
  ObjectId: GraphQLObjectId,
};

export default makeExecutableSchema({ typeDefs, resolvers });

License

MIT

1.1.1

12 months ago

1.1.0

12 months ago

1.1.2

12 months ago

1.0.0

1 year ago