How to use the cormo.Model function in cormo

To help you get started, we’ve selected a few cormo examples, based on popular ways it is used in public projects.

github croquiscom / cormo / packages / graphql / src / decorators.ts View on Github external
export function Model(options: { connection?: cormo.Connection, name?: string, description?: string } = {}) {
  const c = cormo.Model({ connection: options.connection, name: options.name });
  return (ctor: typeof cormo.BaseModel) => {
    c(ctor);
    (ctor as any)._graphql = {
      description: options.description,
    };
  };
}

cormo

ORM framework for Node.js

MIT
Latest version published 17 days ago

Package Health Score

70 / 100
Full package analysis

Similar packages