@boilerz/super-server-mongo

1.1.23 • Public • Published

@boilerz/super-server-mongo

GitHub package.json version GH CI Action codecov

Mongo database support for super server

Install

npx install-peerdeps @boilerz/super-server-mongo

Usage

import { Arg, Query, Resolver } from 'type-graphql';
import * as superServer from '@boilerz/super-server';
import mongoPlugin from '@boilerz/super-server-mongo';

@Resolver()
class GreetingResolver {
  @Query(() => String)
  public hello(@Arg('name') name: string): string {
    return `Hello ${name}`;
  }
}

superServer
  .start({
    resolvers: [GreetingResolver],
    plugins: [mongoPlugin], // <-- Plugin here
  })
  .catch(console.error);

Another example with local auth plugin example

Release

yarn version
yarn build
yarn publish dist --access public

Readme

Keywords

none

Package Sidebar

Install

npm i @boilerz/super-server-mongo

Weekly Downloads

1

Version

1.1.23

License

MIT

Unpacked Size

2.39 kB

Total Files

4

Last publish

Collaborators

  • boilerz-tech