RepositoryTypeScript
graphql-nexus

graphql-nexus/nexus-prisma

Prisma plugin for Nexus

556stars
44forks
36issues
0views

🔌 Nexus-Prisma: Plugin Prisma cho Nexus

Kết nối Nexus và Prisma — tự động sinh kiểu GraphQL từ schema Prisma, giảm boilerplate CRUD đáng kể.

Nexus-Prisma là plugin cho phép Nexus (framework GraphQL schema-first bằng TypeScript) tích hợp sâu với Prisma (ORM hiện đại). Thay vì viết thủ công kiểu GraphQL cho từng model, plugin này đọc schema Prisma và sinh ra các kiểu, đầu vào, enum tương ứng — rồi bạn chỉ cần dùng chúng trong Nexus như bình thường.

✨ Điểm nổi bật

  • Tự động sinh kiểu GraphQL: plugin quét Prisma schema và tạo object type, input type, enum type tương ứng.
  • Hỗ trợ CRUD đầy đủ: sinh sẵn các input cho create, update, where, orderBy, pagination.
  • Tích hợp Prisma client: resolver tự động gọi Prisma client để truy vấn database.
  • Tùy biến linh hoạt: có thể override type, thêm field, hoặc mở rộng behavior mà không mất tính năng tự động.
  • Hỗ trợ scalar tùy chỉnh: mapping Prisma scalar sang GraphQL scalar tùy chỉnh (UUID, JSON, DateTime...).
  • TypeScript mạnh mẽ: toàn bộ kiểu được sinh ra đảm bảo type-safety từ schema Prisma đến resolver.
  • Hỗ trợ Prisma 2+: chạy trên Prisma 2 trở lên, tận dụng generator plugin mới.

💡 Vì sao đáng chú ý

Thay vì viết thủ công các type GraphQL cho từng bảng và field — dễ sai, tốn thời gian — Nexus-Prisma để phép sinh tự động làm phần vất vả này. Khi schema Prisma thay đổi, các type GraphQL tự động cập nhật, tránh rủi ro type rời rạc.

Phù hợp với dự án dùng Prisma làm ORM và Nexus làm GraphQL server: giảm tới 70% code boilerplate CRUD, đồng thời giữ được khả năng tùy chỉnh khi cần.


#GraphQL #Nexus #Prisma #TypeScript #CodeGeneration #API #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
strapi/strapi

🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable, and developer-first.

73.4k
Oct 23, 2026
RepositoryTypeScript
trpc/trpc

🧙‍♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.

40.7k
Oct 20, 2026
RepositoryTypeScript
Kong/insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.

40.1k
Oct 23, 2026
RepositoryTypeScript
directus/directus

The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.

38.6k
Oct 23, 2026
RepositoryTypeScript
hasura/graphql-engine

Blazing fast, instant realtime GraphQL APIs on all your data with fine grained access control, also trigger webhooks on database events.

32.1k
Oct 21, 2026
RepositoryTypeScript
redwoodjs/graphql

RedwoodGraphQL

17.6k
Oct 5, 2026
RepositoryTypeScript
mohammed-bahumaish/prisma-editor

Prisma Editor - A powerful tool to visualize and edit Prisma Schema.

1.0k
Sep 9, 2026
RepositoryTypeScript
Gomah/prisma-serverless

Prisma (Nexus) + Typescript + AWS Serverless Lambda = :fireworks:

115
Jan 9, 2023
RepositoryPython
public-apis/public-apis

A collective list of free APIs

492.4k
Oct 24, 2026