@boilerz/super-server-mongo
v1.1.23
Published
Mongo database support for super server
Downloads
17
Readme
@boilerz/super-server-mongo
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