@gqloom/drizzle
v0.11.0
Published
GQLoom integration with Drizzle ORM
Maintainers
Readme
GQLoom
GQLoom is a Code-First GraphQL Schema Loom used to weave runtime types in the TypeScript/JavaScript ecosystem into GraphQL Schema, helping you build GraphQL server enjoyably and efficiently.
Runtime validation libraries such as Zod, Valibot, and Yup have been widely used in backend application development. Meanwhile, when using ORM libraries like Prisma, MikroORM, and Drizzle, we also pre-define database table structures or entity models that contain runtime types. The responsibility of GQLoom is to weave these runtime types into a GraphQL Schema.
When developing backend applications with GQLoom, you only need to write types using the Schema libraries you're familiar with. Modern Schema libraries will infer TypeScript types for you, and GQLoom will weave GraphQL types for you.
In addition, the resolver factory of GQLoom can create CRUD interfaces for Prisma, MikroORM, and Drizzle, and supports custom input and adding middleware.
Drizzle
Drizzle is a modern, type-safe TypeScript ORM designed for Node.js. It offers a concise and easy-to-use API, supports databases such as PostgreSQL, MySQL, and SQLite, and has powerful query builders, transaction processing, and database migration capabilities. At the same time, it remains lightweight and has no external dependencies, making it very suitable for database operation scenarios that require high performance and type safety.
@gqloom/drizzle
This package provides GQLoom integration with Drizzle:
- Weave database tables defined by Drizzle into a GraphQL Schema;
- Support quickly creating CRUD interfaces from Drizzle using the resolver factory;
Installation
# use npm
npm install @gqloom/core @gqloom/drizzle
# use pnpm
pnpm add @gqloom/core @gqloom/drizzle
# use yarn
yarn add @gqloom/core @gqloom/drizzleRead more at GQLoom Document.
