PJPalJS

Introduction

Welcome to PalJS - your comprehensive toolkit for building modern GraphQL APIs with Prisma.

What is PalJS?

PalJS is a powerful toolkit that accelerates GraphQL API development with Prisma. It provides code generation, admin interfaces, and query optimization tools that let you build production-ready GraphQL APIs in minutes.

In v9, PalJS runs as a native Prisma generator — just add it to your schema.prisma and everything is generated with a single prisma generate command.

Quick Start

1. Install the Generator

2. Add to Your Prisma Schema

prisma
generator client {
  provider = "prisma-client"
  output   = "../src/generated/prisma"
}
 
generator paljs {
  provider = "paljs-generator"
  output   = "./generated/paljs"
}

3. Create Configuration

Create a paljs.config.ts file next to your schema.prisma:

typescript
import { defineConfig } from '@paljs/generator/config';
 
export default defineConfig({
  generateGraphQL: true,
  generateTypes: true,
  generateAdmin: {
    enabled: true,
    output: './admin',
    routerType: 'app',
  },
});

4. Generate Everything

5. Start Development

Why Choose PalJS?

  • Single Command: prisma generate generates GraphQL types, client queries, admin UI, and typed helpers
  • Type Safe: Generated ModelsObject type eliminates any casts in PrismaSelect
  • Prisma 7 Native: Runs as a Prisma generator — no separate CLI or build step
  • Flexible Config: defineConfig() with TypeScript autocomplete and per-model control
  • Modern Admin: React 19 + Tailwind 4 admin interface with full CRUD

Core Packages

Code Generation

GraphQL Integration

User Interface

Installation

Install the packages you need:

Next Steps

  1. Generator Setup — Set up the native Prisma generator
  2. Configuration — Learn all defineConfig() options
  3. Upgrade Guide — Migrating from v8 to v9
  4. Prisma 7 Compatibility — Working with Prisma 7

Command Palette

Search for a command to run...