Skip to content

docs: add Prisma Next API reference section#8033

Merged
nurul3101 merged 18 commits into
mainfrom
feat/prisma-next-reference
Jul 8, 2026
Merged

docs: add Prisma Next API reference section#8033
nurul3101 merged 18 commits into
mainfrom
feat/prisma-next-reference

Conversation

@nurul3101

@nurul3101 nurul3101 commented Jul 7, 2026

Copy link
Copy Markdown
Member

What this adds

A complete API reference for Prisma Next under /orm/next/reference, joining the existing Data Modeling / Fundamentals / Middleware / Extensions sections:

  • Reference index — the query surfaces at a glance, when to use which, and how database differences are documented.
  • ORM client reference — every collection method (where, include, orderBy, mutations, aggregates, filters, Mongo field operations), schema-first like the classic Prisma Client reference, with PostgreSQL/MongoDB tabs where usage differs and "For Prisma 7 users" migration diffs on the core methods.
  • SQL query builder referencedb.sql.public.<table> entry points, SELECT/joins (incl. lateral), grouped queries, mutations with returning, expressions, param(), build() + execution, capability gating.
  • Pipeline builder reference — the full MongoDB db.query surface: stages, all 19 accumulators, expression-helper tables, read/write terminals, rawCommand().
  • Raw queries reference — PostgreSQL raw SQL tagged templates and all 9 MongoDB raw collection commands, with explicit decoding/parameter-binding caveats.
  • Transactions & runtime reference — client lifecycles for both databases, PostgreSQL transactions at all three levels, prepared statements, execution options, and an honest "MongoDB transactions are not available today" note.

How it was validated

Every code example is transcribed from a passing test in a local validation harness inside the prisma-next monorepo (kept out of git there): 294 vitest tests running against real databases — ephemeral Postgres via withDevDatabase, MongoDB via mongodb-memory-server. Every availability claim traces to a per-method manifest generated from those test results; claims that could not be executed (Atlas-only stages, unshipped Mongo transactions) are explicitly labeled instead of implied.

The validation surfaced real product behavior now documented as verified warnings rather than happy-path assumptions, including: pipeline match() _id equality filters never matching, PostgreSQL raw bare-scalar interpolation being broken (param(...) is mandatory), type-only vs runtime where() guards differing per database, and raw results bypassing codec decoding. Upstream reports for the confirmed bugs are being filed separately against prisma-next.

Notes for reviewers

  • Conventions match the merged Fundamentals section (db.orm.public.User / db.orm.users / db.sql.public.<table> accessors, tab= code fences, example schema up front) — the accessor style itself was empirically validated before adoption.
  • pnpm --filter docs lint:links is clean (0 errors); the docs build compiles all MDX (the /api/search MXBAI_API_KEY failure is pre-existing and unrelated).
  • One known cross-suite follow-up (tracked separately): fundamentals/reading-data.mdx understates MongoDB where() filter capabilities relative to the verified reference.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a Prisma Next Reference section to the docs navigation, including dedicated pages for the ORM client, SQL query builder, pipeline builder, raw queries, and transactions/runtime (with early-access badge).
  • Documentation
    • Published detailed API reference content for query building, mutations, execution/compilation, result handling, raw escape hatches, and PostgreSQL vs MongoDB behavior/caveats.
  • Chores
    • Expanded spellcheck dictionary entries in the docs configuration.

nurul3101 and others added 15 commits July 3, 2026 20:24
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Jul 8, 2026 11:37am
docs Ready Ready Preview, Comment Jul 8, 2026 11:37am
eclipse Ready Ready Preview, Comment Jul 8, 2026 11:37am
site Ready Ready Preview, Comment Jul 8, 2026 11:37am

Request Review

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🍈 Lychee Link Check Report

77 links: ✅ 0 OK | 🚫 0 errors | 🔀 0 redirects | 👻 77 excluded

✅ All links are working!


Full Statistics Table
Status Count
✅ Successful 0
🔀 Redirected 0
👻 Excluded 77
🚫 Errors 0
⛔ Unsupported 0
⏳ Timeouts 0
❓ Unknown 0

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6582efc0-a13f-4c39-9cf5-3a7b05ecefc6

📥 Commits

Reviewing files that changed from the base of the PR and between 60469ce and 7004d80.

📒 Files selected for processing (1)
  • apps/docs/cspell.json
✅ Files skipped from review due to trivial changes (1)
  • apps/docs/cspell.json

Walkthrough

This PR adds a new Prisma Next “Reference” docs section, wires it into ORM navigation, and adds reference pages for the ORM client, SQL query builder, pipeline builder, raw queries, and transactions/runtime.

Changes

Reference Documentation Addition

Layer / File(s) Summary
Navigation and landing page
apps/docs/content/docs/orm/next/meta.json, apps/docs/content/docs/orm/next/reference/meta.json, apps/docs/content/docs/orm/next/reference/index.mdx
Adds the Reference navigation entry, the section metadata ordering, and the landing page with overview text and links to the subpages.
ORM client reference
apps/docs/content/docs/orm/next/reference/orm-client.mdx
Documents ORM client setup, querying, read/write terminals, aggregates, filters, MongoDB field updates, and result shapes across PostgreSQL and MongoDB.
SQL query builder reference
apps/docs/content/docs/orm/next/reference/sql-query-builder.mdx
Documents SQL query builder entry points, select/join/subquery APIs, grouped queries, mutations, expressions, and execution flow.
Pipeline builder reference
apps/docs/content/docs/orm/next/reference/pipeline-builder.mdx
Documents the MongoDB aggregation pipeline builder entry point, stages, accumulators, expression helpers, write terminals, and raw command escape hatch.
Raw queries reference
apps/docs/content/docs/orm/next/reference/raw-queries.mdx
Documents PostgreSQL raw SQL fragments and MongoDB raw commands, including CRUD forms and findOneAndUpdate/delete behavior.
Transactions and runtime reference
apps/docs/content/docs/orm/next/reference/transactions-and-runtime.mdx
Documents PostgreSQL and MongoDB client lifecycle, transaction APIs, prepared statements, execution options, telemetry, and result consumption behavior.
Dictionary updates
apps/docs/cspell.json
Adds several terms to the cspell word list.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • prisma/web#7999: Both PRs touch the Prisma Next ORM docs navigation/metadata, including apps/docs/content/docs/orm/next/meta.json.
  • prisma/web#8008: Both PRs modify Prisma Next docs navigation wiring and apps/docs/cspell.json.
  • prisma/web#8011: Both PRs update the same ORM Next navigation structure in apps/docs/content/docs/orm/next/meta.json.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a Prisma Next API reference section to the docs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@argos-ci

argos-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 8, 2026, 11:44 AM

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/content/docs/orm/next/reference/sql-query-builder.mdx`:
- Line 718: The `build()` links in the mutation/query-builder docs are pointing
to the wrong anchor, so update both references in the affected prose to use the
correct slug for the combined `build()` and `aggregate()` heading. Locate the
Markdown in the `sql-query-builder.mdx` reference section where `returning()`,
`build()`, `insert()`, `update()`, and `delete()` are mentioned, and replace
each `#build` link with `#build-and-aggregate` so the in-page navigation
resolves correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 95d8c1b4-e366-4814-9284-a75005c76537

📥 Commits

Reviewing files that changed from the base of the PR and between 52fe2bb and 0ab170e.

📒 Files selected for processing (8)
  • apps/docs/content/docs/orm/next/meta.json
  • apps/docs/content/docs/orm/next/reference/index.mdx
  • apps/docs/content/docs/orm/next/reference/meta.json
  • apps/docs/content/docs/orm/next/reference/orm-client.mdx
  • apps/docs/content/docs/orm/next/reference/pipeline-builder.mdx
  • apps/docs/content/docs/orm/next/reference/raw-queries.mdx
  • apps/docs/content/docs/orm/next/reference/sql-query-builder.mdx
  • apps/docs/content/docs/orm/next/reference/transactions-and-runtime.mdx

Comment thread apps/docs/content/docs/orm/next/reference/sql-query-builder.mdx
AmanVarshney01
AmanVarshney01 previously approved these changes Jul 8, 2026
@AmanVarshney01

Copy link
Copy Markdown
Member

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Comments resolved. Approval is disabled; enable reviews.request_changes_workflow to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

1 similar comment
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Comments resolved. Approval is disabled; enable reviews.request_changes_workflow to allow explicit top-level @coderabbitai resolve or @coderabbitai approve commands.

@nurul3101 nurul3101 merged commit 2212ee6 into main Jul 8, 2026
18 checks passed
@nurul3101 nurul3101 deleted the feat/prisma-next-reference branch July 8, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants