apollo-passport-mongodb

0.0.1 • Public • Published

apollo-passport-rethinkdbdash

rethinkdbdash driver for apollo-passport

npm Circle CI Coverage Status MIT License

Copyright (c) 2016 by Gadi Cohen, released under the MIT license.

Usage

import { MongoClient } from 'mongodb';
import MongoDriver from './index';
 
// However you usually create your mongodb instance
const m = await MongoClient.connect(`mongodb://${host}:${port}/${name}`);
 
// Pass to apollo passport at creation time
const apolloPassport = new ApolloPassport({
  // along with any other relevant options
  db: new MongoDriver(m)
});

Optional parameters, e.g. if your users table is called something else:

new MongoDriver(r, {
  userTableName: 'users',
  configTableName: 'apolloPassportConfig',
  db: '(override default database given to mongo)'
});

See apollo-passport for more info.

Create your own DBDriver

This package is fully documented with 100% test coverage. It can be used as a basis for creating other DBDrivers for Apollo Passport.

See also the API Docs, ordered by version and viewable online via rawgit, e.g. v0.0.2 API Docs on RawGit.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    0

Package Sidebar

Install

npm i apollo-passport-mongodb

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • tomitrescak