@paljs/nexus
Introduction
A Nexus plugin that provides Prisma integration with automatic field selection, admin schema generation, and GraphQL scalar types. Bridges Prisma and Nexus GraphQL to create type-safe, efficient GraphQL APIs.
Installation
Peer Dependencies
@prisma/client^6 or ^7graphql^15 || ^16nexus^1
Setup
Plugin Options
Automatic Field Selection
The plugin adds a select object to your GraphQL context based on the fields requested in the query:
Prisma 7 — DMMF Changes
In Prisma 7, Prisma.dmmf is no longer exported from the client. If you need DMMF for field validation, use the DMMF generated by @paljs/generator:
Without DMMF, PrismaSelect still works for basic field selection but skips field validation. See @paljs/plugins for details.
Built-in Scalar Types
The plugin includes these GraphQL scalar types for Prisma:
DateTimeJsonDecimalBigIntBytes
Exclude any you define yourself:
Full Example
Using with Generated Types
With @paljs/generator, use the generated Nexus types directly: