Skip to content

About

🔨 With inverse model you can connect anywhere DB. Just have a connection string.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

Nest Logo

Inverse Model mounts a GraphQL API over an existing database from just its connection string.

npm CI License

Documentation · Documentación en español

Install

npm install @nestjs-modules/inverse-model

Plus the driver of your database: pg, mysql2, mssql or mongodb. See Getting started for the peer dependencies.

Usage

import { Module } from '@nestjs/common';
import { InverseModelModule } from '@nestjs-modules/inverse-model';

@Module({
  imports: [InverseModelModule.forRoot({ url: process.env.DATABASE_URL! })],
})
export class AppModule {}

On start it reads every table, key and foreign key of the database, and serves a GraphQL API with filters, pagination, relations and every mutation, for PostgreSQL, MySQL, MariaDB, SQL Server and MongoDB.

Everything else is in the documentation: the generated API, security, caching, extending and all the options.

Contributing

See Contributing.

License

MIT

About

🔨 With inverse model you can connect anywhere DB. Just have a connection string.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages