Upgrade Guide: v8 to v9
This guide covers migrating from PalJS v8.x to v9.0.
What Changed
PalJS v9 consolidates code generation into a native Prisma generator that runs during prisma generate. The separate CLI, project scaffolding, and legacy generator patterns have been removed.
Breaking Changes
1. @paljs/cli Removed
The pal CLI no longer exists. All code generation is done via prisma generate.
2. @paljs/create Removed
Project scaffolding is no longer provided. Use create-next-app or create-t3-app, then add PalJS packages manually.
3. @paljs/display Removed
No longer maintained or needed.
4. SDL and GraphQL Modules Generators Removed
Only Nexus code-first generation is supported in v9. If you need SDL output, generate a Nexus schema and use printSchema() from graphql:
5. Configuration Format Changed
pal.config.js is replaced by paljs.config.ts with a flat structure using defineConfig().
6. Generator is Now a Prisma Generator
Must be declared in schema.prisma as a generator block.
7. Requires Prisma 7
DMMF is captured during generation — no dependency on @prisma/internals.
8. Admin Requires React 19 + Tailwind 4
@paljs/admin now uses React 19, Tailwind CSS 4, HeadlessUI, TanStack React Table, and DND-kit.
Migration Steps
Step 1: Remove Old Packages
If you had @paljs/cli installed globally:
Step 2: Install New Packages
Step 3: Add Generator to schema.prisma
Step 4: Convert Configuration
Create paljs.config.ts in the same directory as schema.prisma:
Before (pal.config.js):
After (paljs.config.ts):
Step 5: Update Build Scripts
Remove any pal g or pal generate commands.
Step 6: Update PrismaSelect Imports (Optional)
For typed PrismaSelect with the new ModelsObject:
Step 7: Update DMMF Usage (Prisma 7)
If you pass DMMF to the nexus plugin or PrismaSelect:
Step 8: Run Generation
Configuration Mapping
| v8 Option | v9 Option |
|---|---|
backend.generator: 'nexus' | generateGraphQL: true |
backend.output | generateGraphQL.nexusOutput |
backend.excludeFields | excludeFields |
backend.excludeModels | models: { X: { exclude: true } } |
backend.excludeFieldsByModel | models: { X: { excludeFields: [...] } } |
backend.excludeQueriesAndMutations | excludeQueriesAndMutations |
backend.excludeQueriesAndMutationsByModel | models: { X: { excludeQueriesAndMutations: [...] } } |
frontend.admin.outPut | generateAdmin.output |
frontend.admin.routerType | generateAdmin.routerType |
New Features in v9
- Native Prisma Generator — Runs as part of
prisma generate defineConfig()with TypeScript — Type-safe configuration with autocomplete- Typed PrismaSelect — Generated
ModelsObjecteliminatesanycasts - DMMF Writer — Exports DMMF JSON for custom tooling and Prisma 7 compatibility
- Per-Model Configuration — Fine-grained control over each model
- Boolean Shorthand —
generateGraphQL: trueexpands to full defaults - Admin on React 19 + Tailwind 4 — Modern stack with HeadlessUI, TanStack Table, DND-kit
Troubleshooting
Generator not found
Ensure @paljs/generator is installed as a dev dependency and node_modules/.bin is in your PATH.
Config file not loading
Place paljs.config.ts in the same directory as schema.prisma, or specify the path:
TypeScript errors in generated files
Ensure TypeScript 5+ and proper module config:
FAQ
Can I still use SDL or GraphQL Modules?
Not directly. v9 only generates Nexus code-first types. For SDL output, generate a Nexus schema and use printSchema().
What about @paljs/create?
Deprecated. Use create-next-app or create-t3-app to scaffold projects, then add PalJS packages.
Does PrismaSelect still work?
Yes. @paljs/plugins works as before. The generator adds typed helpers (ModelsObject) for better type safety.