docs icon indicating copy to clipboard operation
docs copied to clipboard

DC-6433- Docs update for setup configuration

Open ArthurGamby opened this issue 3 weeks ago โ€ข 5 comments

Summary by CodeRabbit

  • Documentation

    • Updated integration and getting started guides for Postgres, Netlify, Supabase, and Neon with clearer Accelerate configuration. PrismaClient initialization pattern simplifiedโ€”accelerate URL no longer needs to be passed via constructor options.
  • Bug Fixes

    • Fixed import path typo in Accelerate extension package references.

โœ๏ธ Tip: You can customize this high-level summary in your review settings.

ArthurGamby avatar Dec 03 '25 20:12 ArthurGamby

Walkthrough

Documentation updates across five Markdown files that remove the accelerateUrl constructor option from PrismaClient initialization examples. The pattern shifts from new PrismaClient({ accelerateUrl: ... }).$extends(withAccelerate()) to new PrismaClient().$extends(withAccelerate()). One import path typo is corrected in the Netlify integration guide.

Changes

Cohort / File(s) Summary
Constructor pattern updates
content/250-postgres/300-database/350-caching.mdx, content/300-accelerate/200-getting-started.mdx, content/800-guides/300-supabase-accelerate.mdx, content/800-guides/310-neon-accelerate.mdx
Removed accelerateUrl option from PrismaClient() constructor. Examples updated to instantiate client without options and apply withAccelerate() extension via chained .$extends() call.
Import path and constructor fix
content/250-postgres/350-integrations/100-netlify.mdx
Corrected import path typo (@prisam/extension-accelerate โ†’ @prisma/extension-accelerate) and removed accelerateUrl constructor option, matching pattern updates in other files.

Estimated code review effort

๐ŸŽฏ 2 (Simple) | โฑ๏ธ ~10 minutes

  • Rationale: Homogeneous, repetitive changes applied consistently across five documentation files. Same refactor pattern verified once applies to all files. Documentation-only edits with no code logic impact. One typo fix included.

Possibly related PRs

  • prisma/docs#7246: Modifies the same documentation snippets for PrismaClient and withAccelerate() usage patterns.
  • prisma/docs#7272: Updates Prisma Postgres caching documentation and PrismaClient initialization patterns for the Accelerate extension.
  • prisma/docs#7266: Directly conflicts with this PRโ€”reverses these changes by adding accelerateUrl back to PrismaClient instantiation in the same documentation areas.

Pre-merge checks

โŒ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check โ“ Inconclusive The title references a ticket (DC-6433) and mentions 'setup configuration,' but doesn't clearly convey the main change: removing accelerateUrl from PrismaClient constructor across multiple documentation files. Consider a more specific title like 'Update Prisma Client initialization examples to remove accelerateUrl option' to clearly communicate the primary change to reviewers scanning history.
โœ… Passed checks (2 passed)
Check name Status Explanation
Description Check โœ… Passed Check skipped - CodeRabbitโ€™s high-level summary is enabled.
Docstring Coverage โœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

๐Ÿ“œ Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 2076e5adb0bf4a815834ccbe2f021d0559e03149 and 31b18fe141ac81570c71fbad851f16d2f3e6fbd3.

๐Ÿ“’ Files selected for processing (5)
  • content/250-postgres/300-database/350-caching.mdx (2 hunks)
  • content/250-postgres/350-integrations/100-netlify.mdx (1 hunks)
  • content/300-accelerate/200-getting-started.mdx (3 hunks)
  • content/800-guides/300-supabase-accelerate.mdx (1 hunks)
  • content/800-guides/310-neon-accelerate.mdx (1 hunks)
๐Ÿงฐ Additional context used
๐Ÿง  Learnings (4)
๐Ÿ““ Common learnings
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7301
File: content/800-guides/410-cloudflare-workers.mdx:87-107
Timestamp: 2025-11-20T21:00:02.587Z
Learning: Do not suggest changes to `prisma.config.ts` files in the prisma/docs repository, as the code examples are intentional for documentation purposes.
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:50-66
Timestamp: 2025-10-08T16:22:57.129Z
Learning: In `.mdx` files, do NOT flag or suggest changes for the following code quality issues even if they represent poor practices: React anti-patterns (using var instead of useState, direct DOM manipulation), missing keys in .map() iterations, non-serializable props in getServerSideProps, unused variables, missing error handling, SQL injection vulnerabilities (unless actively showing how to fix them), insecure cookie settings, missing TypeScript types, PrismaClient instantiation patterns, or any other code quality, security, or performance issues. Documentation code snippets are copied from source code and often intentionally show "before" examples or common mistakes.
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: Only flag code snippets for (1) exposed secrets with real-looking values that should be placeholders (e.g., API keys, database passwords, AWS credentials), or (2) blatant syntax errors like missing parentheses, brackets, braces, or mismatched delimiters. Do not flag code quality issues, anti-patterns, security vulnerabilities, missing error handling, unused variables, or any other bad practices, as documentation intentionally shows problematic code.
๐Ÿ“š Learning: 2025-11-20T21:00:02.587Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7301
File: content/800-guides/410-cloudflare-workers.mdx:87-107
Timestamp: 2025-11-20T21:00:02.587Z
Learning: Do not suggest changes to `prisma.config.ts` files in the prisma/docs repository, as the code examples are intentional for documentation purposes.

Applied to files:

  • content/250-postgres/300-database/350-caching.mdx
  • content/800-guides/300-supabase-accelerate.mdx
๐Ÿ“š Learning: 2025-08-11T09:40:55.237Z
Learnt from: ankur-arch
Repo: prisma/docs PR: 7066
File: content/200-orm/200-prisma-client/700-debugging-and-troubleshooting/245-troubleshooting-binary-size-issues.mdx:8-22
Timestamp: 2025-08-11T09:40:55.237Z
Learning: When the queryCompiler preview feature is enabled in Prisma ORM (v6.7.0+), it does not require Rust engines for CLI tools like `prisma migrate` or `prisma db pull`. The previous understanding that CLI tools would still need Rust binaries even with queryCompiler enabled is incorrect.

Applied to files:

  • content/250-postgres/300-database/350-caching.mdx
๐Ÿ“š Learning: 2025-10-09T21:32:50.340Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7167
File: content/900-ai/prompts/astro.mdx:84-84
Timestamp: 2025-10-09T21:32:50.340Z
Learning: The `npx prisma init` command supports the following flags: `--db` (shorthand for `--datasource-provider prisma+postgres`), `--output` (specifies output location for generated client), `--generator-provider` (defines the generator provider), `--datasource-provider`, `--url`, `--preview-feature`, and `--with-model`. These are documented valid CLI options for Prisma init command.

Applied to files:

  • content/250-postgres/300-database/350-caching.mdx
  • content/800-guides/310-neon-accelerate.mdx
  • content/800-guides/300-supabase-accelerate.mdx
  • content/300-accelerate/200-getting-started.mdx
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Check internal links
  • GitHub Check: Cloudflare Pages
๐Ÿ”‡ Additional comments (6)
content/250-postgres/300-database/350-caching.mdx (1)

53-53: Consistent API update across runtimes.

The PrismaClient instantiation correctly shifts to a no-argument constructor with the Accelerate extension applied via .$extends(withAccelerate()) for both standard and edge runtimes. The pattern is clean and consistent.

Also applies to: 64-64

content/800-guides/300-supabase-accelerate.mdx (1)

175-175: Correct PrismaClient setup for Supabase integration.

The instantiation properly applies the Accelerate extension without passing options to the constructor, following the updated API pattern.

content/250-postgres/350-integrations/100-netlify.mdx (1)

166-166: Import path corrected and API pattern applied.

The import from @prisma/extension-accelerate is correctly spelled, and the PrismaClient instantiation follows the updated pattern without constructor options.

Also applies to: 168-168

content/300-accelerate/200-getting-started.mdx (2)

133-133: Consistent application across standard and edge runtimes.

Both runtimes correctly instantiate PrismaClient without options and apply the extension via .$extends(withAccelerate()).

Also applies to: 142-142


154-157: Correct extension chaining order documented.

The example properly demonstrates chaining Optimize before Accelerate, consistent with the documented extension precedence rules.

content/800-guides/310-neon-accelerate.mdx (1)

175-175: Consistent Neon integration setup.

The PrismaClient instantiation correctly follows the updated pattern, matching the approach across Supabase and other integration guides.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

โค๏ธ Share

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

coderabbitai[bot] avatar Dec 03 '25 20:12 coderabbitai[bot]

Dangerous URL check

No absolute URLs to prisma.io/docs found. No local URLs found.

github-actions[bot] avatar Dec 03 '25 20:12 github-actions[bot]

Redirect check

This PR probably requires the following redirects to be added to static/_redirects:

  • This PR does not change any pages in a way that would require a redirect.

github-actions[bot] avatar Dec 03 '25 20:12 github-actions[bot]

๐Ÿˆ Lychee Link Check Report

Note: Links are cached for 5 minutes. Failed links (timeouts, rate limits) are retried in a second run with longer timeout.

๐Ÿ“Š Results Overview

Status Count
๐Ÿ” Total 2268
โœ… Successful 2237
โณ Timeouts 0
๐Ÿ”€ Redirected 5
๐Ÿ‘ป Excluded 24
โ“ Unknown 0
๐Ÿšซ Errors 1
โ›” Unsupported 1

Errors per input

Errors in 200-orm/050-overview/100-introduction/300-data-modeling.mdx

github-actions[bot] avatar Dec 03 '25 20:12 github-actions[bot]