-
Notifications
You must be signed in to change notification settings - Fork 856
DC-5043 Middleware removed from docs #7233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis PR removes or refactors middleware-related documentation across the docs: deletes multiple middleware example pages, eliminates middleware guidance and comparisons in client-extensions and API reference, updates extension ordering examples to exclude middleware, and adjusts an instrumentation example to instantiate PrismaInstrumentation without middleware options. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (3)
Comment |
Dangerous URL checkNo absolute URLs to prisma.io/docs found. |
Redirect checkThis PR probably requires the following redirects to be added to static/_redirects: |
Deploying docs with
|
| Latest commit: |
d849203
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://67ed9c20.docs-51g.pages.dev |
| Branch Preview URL: | https://dc-5043-remove-middleware.docs-51g.pages.dev |
🍈 Lychee Link Check Report
📊 Results Overview
Errors per inputErrors in 250-postgres/400-query-optimization/300-recommendations/600-avoid-db-money.mdx
Redirects per inputRedirects in 100-getting-started/01-quickstart-prismaPostgres.mdx
Redirects in 100-getting-started/01-quickstart-sqlite.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases-typescript-prismaPostgres.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases/100-connect-your-database-node-planetscale.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases/100-connect-your-database-node-sqlserver.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases/100-connect-your-database-typescript-planetscale.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases/100-connect-your-database-typescript-prismaPostgres.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases/100-connect-your-database-typescript-sqlserver.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/110-relational-databases/300-next-steps.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/120-mongodb-node-mongodb.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/120-mongodb-typescript-mongodb.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/120-mongodb/100-connect-your-database-node-mongodb.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/120-mongodb/100-connect-your-database-typescript-mongodb.mdx
Redirects in 100-getting-started/02-setup-prisma/100-start-from-scratch/120-mongodb/300-next-steps.mdx
Redirects in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases/100-connect-your-database-node-planetscale.mdx
Redirects in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases/100-connect-your-database-node-sqlserver.mdx
Redirects in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases/100-connect-your-database-typescript-planetscale.mdx
Redirects in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases/100-connect-your-database-typescript-sqlserver.mdx
Redirects in 100-getting-started/02-setup-prisma/200-add-to-existing-project/110-relational-databases/300-next-steps.mdx
Redirects in 100-getting-started/02-setup-prisma/200-add-to-existing-project/120-mongodb-node-mongodb.mdx
Redirects in 100-getting-started/02-setup-prisma/200-add-to-existing-project/120-mongodb-typescript-mongodb.mdx
Redirects in 100-getting-started/02-setup-prisma/200-add-to-existing-project/120-mongodb/300-next-steps.mdx
Redirects in 100-getting-started/03-prisma-postgres/100-from-the-cli.mdx
Redirects in 100-getting-started/03-prisma-postgres/110-import-from-existing-database-postgresql.mdx
Redirects in 100-getting-started/03-prisma-postgres/115-import-from-existing-database-mysql.mdx
Redirects in 100-getting-started/03-prisma-postgres/120-upgrade-from-early-access.mdx
Redirects in 200-orm/050-overview/100-introduction/200-why-prisma.mdx
Redirects in 200-orm/050-overview/100-introduction/250-should-you-use-prisma.mdx
Redirects in 200-orm/050-overview/300-prisma-in-your-stack/01-rest.mdx
Redirects in 200-orm/050-overview/300-prisma-in-your-stack/02-graphql.mdx
Redirects in 200-orm/050-overview/300-prisma-in-your-stack/03-fullstack.mdx
Redirects in 200-orm/050-overview/500-databases/200-database-drivers.mdx
Redirects in 200-orm/050-overview/500-databases/300-postgresql.mdx
Redirects in 200-orm/050-overview/500-databases/400-mysql.mdx
Redirects in 200-orm/050-overview/500-databases/600-mongodb.mdx
Redirects in 200-orm/050-overview/500-databases/800-sql-server/020-sql-server-local.mdx
Redirects in 200-orm/050-overview/500-databases/850-planetscale.mdx
Redirects in 200-orm/050-overview/500-databases/880-supabase.mdx
Redirects in 200-orm/050-overview/500-databases/890-neon.mdx
Redirects in 200-orm/050-overview/500-databases/900-turso.mdx
Redirects in 200-orm/050-overview/500-databases/950-cloudflare-d1.mdx
Redirects in 200-orm/100-prisma-schema/10-overview/03-generators.mdx
Redirects in 200-orm/100-prisma-schema/10-overview/04-location.mdx
Redirects in 200-orm/100-prisma-schema/20-data-model/10-models.mdx
Redirects in 200-orm/100-prisma-schema/20-data-model/40-views.mdx
Redirects in 200-orm/200-prisma-client/000-setup-and-configuration/010-generating-prisma-client.mdx
Redirects in 200-orm/200-prisma-client/000-setup-and-configuration/050-databases-connections/200-pgbouncer.mdx
Redirects in 200-orm/200-prisma-client/000-setup-and-configuration/200-read-replicas.mdx
Redirects in 200-orm/200-prisma-client/100-queries/050-filtering-and-sorting.mdx
Redirects in 200-orm/200-prisma-client/100-queries/058-transactions.mdx
Redirects in 200-orm/200-prisma-client/100-queries/061-custom-validation.mdx
Redirects in 200-orm/200-prisma-client/100-queries/070-case-sensitivity.mdx
Redirects in 200-orm/200-prisma-client/150-using-raw-sql/200-raw-queries.mdx
Redirects in 200-orm/200-prisma-client/200-special-fields-and-types/index.mdx
Redirects in 200-orm/200-prisma-client/300-client-extensions/200-extension-examples.mdx
Redirects in 200-orm/200-prisma-client/500-deployment/101-traditional/225-deploy-to-render.mdx
Redirects in 200-orm/200-prisma-client/500-deployment/101-traditional/325-deploy-to-railway.mdx
Redirects in 200-orm/200-prisma-client/500-deployment/201-serverless/300-deploy-to-vercel.mdx
Redirects in 200-orm/200-prisma-client/500-deployment/201-serverless/500-deploy-to-netlify.mdx
Redirects in 200-orm/200-prisma-client/500-deployment/301-edge/100-overview.mdx
Redirects in 200-orm/200-prisma-client/500-deployment/301-edge/450-deploy-to-cloudflare.mdx
Redirects in 200-orm/200-prisma-client/500-deployment/301-edge/485-deploy-to-vercel.mdx
Redirects in 200-orm/200-prisma-client/500-deployment/301-edge/550-deploy-to-deno-deploy.mdx
Redirects in 200-orm/200-prisma-client/500-deployment/550-deploy-database-changes-with-prisma-migrate.mdx
Redirects in 200-orm/200-prisma-client/600-observability-and-logging/250-opentelemetry-tracing.mdx
Redirects in 200-orm/500-reference/100-prisma-schema-reference.mdx
Redirects in 200-orm/500-reference/250-error-reference.mdx
Redirects in 200-orm/500-reference/400-system-requirements.mdx
Redirects in 200-orm/500-reference/500-preview-features/050-client-preview-features.mdx
Redirects in 200-orm/800-more/100-under-the-hood/100-engines.mdx
Redirects in 200-orm/800-more/300-upgrade-guides/200-upgrading-versions/600-upgrading-to-prisma-5/index.mdx
Redirects in 200-orm/800-more/300-upgrade-guides/800-upgrade-from-prisma-1/03-upgrading-the-prisma-layer-mysql.mdx
Redirects in 200-orm/800-more/300-upgrade-guides/800-upgrade-from-prisma-1/03-upgrading-the-prisma-layer-postgresql.mdx
Redirects in 200-orm/800-more/300-upgrade-guides/800-upgrade-from-prisma-1/04-upgrading-nexus-prisma-to-nexus.mdx
Redirects in 200-orm/800-more/300-upgrade-guides/800-upgrade-from-prisma-1/05-upgrading-prisma-binding-to-nexus.mdx
Redirects in 200-orm/800-more/300-upgrade-guides/800-upgrade-from-prisma-1/08-upgrade-from-mongodb-beta.mdx
Redirects in 200-orm/800-more/350-ai-tools/100-cursor.mdx
Redirects in 200-orm/800-more/350-ai-tools/300-windsurf.mdx
Redirects in 200-orm/800-more/350-ai-tools/400-github-copilot.mdx
Redirects in 200-orm/800-more/350-ai-tools/index.mdx
Redirects in 200-orm/800-more/400-comparisons/01-prisma-and-typeorm.mdx
Redirects in 200-orm/800-more/400-comparisons/04-prisma-and-drizzle.mdx
Redirects in 200-orm/800-more/500-development-environment/200-editor-setup.mdx
Redirects in 200-orm/800-more/600-help-and-troubleshooting/050-dataguide/03-date-types.mdx
Redirects in 200-orm/800-more/600-help-and-troubleshooting/050-dataguide/04-connecting-to-postgresql-databases.mdx
Redirects in 200-orm/800-more/600-help-and-troubleshooting/050-dataguide/050-database-glossary.mdx
Redirects in 200-orm/800-more/600-help-and-troubleshooting/800-check-constraints.mdx
Redirects in 250-postgres/100-introduction/250-overview.mdx
Redirects in 250-postgres/300-database/350-caching.mdx
Redirects in 250-postgres/300-database/525-postgres-extensions.mdx
Redirects in 250-postgres/350-integrations/100-netlify.mdx
Redirects in 250-postgres/350-integrations/200-vercel.mdx
Redirects in 250-postgres/350-integrations/300-idx.mdx
Redirects in 250-postgres/350-integrations/400-mcp-server.mdx
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
content/200-orm/200-prisma-client/100-queries/100-query-optimization-performance.mdx(0 hunks)content/200-orm/200-prisma-client/300-client-extensions/120-query.mdx(0 hunks)content/200-orm/200-prisma-client/300-client-extensions/500-middleware/100-soft-delete-middleware.mdx(0 hunks)content/200-orm/200-prisma-client/300-client-extensions/500-middleware/200-logging-middleware.mdx(0 hunks)content/200-orm/200-prisma-client/300-client-extensions/500-middleware/300-session-data-middleware.mdx(0 hunks)content/200-orm/200-prisma-client/300-client-extensions/500-middleware/index.mdx(0 hunks)content/200-orm/200-prisma-client/300-client-extensions/index.mdx(0 hunks)content/200-orm/500-reference/050-prisma-client-reference.mdx(0 hunks)content/200-orm/500-reference/500-preview-features/050-client-preview-features.mdx(1 hunks)content/200-orm/800-more/350-ai-tools/100-cursor.mdx(0 hunks)content/200-orm/800-more/350-ai-tools/300-windsurf.mdx(0 hunks)content/200-orm/800-more/350-ai-tools/400-github-copilot.mdx(0 hunks)content/250-postgres/400-query-optimization/100-setup.mdx(1 hunks)content/300-accelerate/200-getting-started.mdx(1 hunks)content/700-optimize/200-getting-started.mdx(1 hunks)
💤 Files with no reviewable changes (11)
- content/200-orm/200-prisma-client/300-client-extensions/120-query.mdx
- content/200-orm/800-more/350-ai-tools/300-windsurf.mdx
- content/200-orm/200-prisma-client/300-client-extensions/500-middleware/100-soft-delete-middleware.mdx
- content/200-orm/800-more/350-ai-tools/100-cursor.mdx
- content/200-orm/200-prisma-client/300-client-extensions/500-middleware/index.mdx
- content/200-orm/500-reference/050-prisma-client-reference.mdx
- content/200-orm/200-prisma-client/300-client-extensions/index.mdx
- content/200-orm/200-prisma-client/300-client-extensions/500-middleware/200-logging-middleware.mdx
- content/200-orm/200-prisma-client/100-queries/100-query-optimization-performance.mdx
- content/200-orm/800-more/350-ai-tools/400-github-copilot.mdx
- content/200-orm/200-prisma-client/300-client-extensions/500-middleware/300-session-data-middleware.mdx
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-10-14T11:41:08.844Z
Learnt from: carlagn
Repo: prisma/docs PR: 7183
File: content/200-orm/800-more/600-help-and-troubleshooting/050-dataguide/050-database-glossary.mdx:561-567
Timestamp: 2025-10-14T11:41:08.844Z
Learning: Ignore the file `content/200-orm/800-more/600-help-and-troubleshooting/050-dataguide/050-database-glossary.mdx` in future reviews as per user request. Issues in this file were addressed in PR #7185.
Applied to files:
content/200-orm/500-reference/500-preview-features/050-client-preview-features.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/200-orm/500-reference/500-preview-features/050-client-preview-features.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). (4)
- GitHub Check: Check links
- GitHub Check: Check internal links
- GitHub Check: runner / linkspector
- GitHub Check: Cloudflare Pages
🔇 Additional comments (3)
content/300-accelerate/200-getting-started.mdx (1)
151-159: Heading and documentation update align with middleware removal.The removal of "or middleware" from the section heading and updated guidance for extension ordering (Optimize before Accelerate) is consistent with the PR's objective to deprecate middleware patterns in favor of extensions.
content/250-postgres/400-query-optimization/100-setup.mdx (1)
78-86: Multiline extension chaining improves readability.The switch from single-line to multiline chaining (
.$extends()calls on separate lines) makes the extension application order more explicit and the code easier to read. The removal of "or middleware" from the heading aligns with the PR's objectives.content/700-optimize/200-getting-started.mdx (1)
73-81: Clear extension precedence guidance and improved workflow steps.The explicit statement that Accelerate should be applied after Optimize establishes clear precedence rules. The updated steps (lines 87–89) provide more granular guidance by explicitly mentioning the recording start/stop actions, making the workflow clearer for users.
content/200-orm/500-reference/500-preview-features/050-client-preview-features.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
content/200-orm/200-prisma-client/300-client-extensions/120-query.mdx (1)
18-18: Minor: Consider varying sentence structure for better readability.The opening sentence of this paragraph begins with "You can," as does the next sentence. While not technically incorrect, varying the sentence structure slightly would improve the flow and readability of the documentation.
Consider restructuring one of these sentences. For example:
- You can use Prisma Client extensions `query` component to create independent clients with customized behavior. You can bind one client to a specific filter or user, and another client to another filter or user. + You can use Prisma Client extensions `query` component to create independent clients with customized behavior. By binding one client to a specific filter or user and another to a different one, you can achieve granular control.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
content/200-orm/200-prisma-client/300-client-extensions/120-query.mdx(1 hunks)content/200-orm/200-prisma-client/600-observability-and-logging/250-opentelemetry-tracing.mdx(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
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-10-08T16:22:57.129Z
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.
Applied to files:
content/200-orm/200-prisma-client/300-client-extensions/120-query.mdx
📚 Learning: 2025-10-08T16:23:00.388Z
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.
Applied to files:
content/200-orm/200-prisma-client/300-client-extensions/120-query.mdx
🪛 LanguageTool
content/200-orm/200-prisma-client/300-client-extensions/120-query.mdx
[style] ~18-~18: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ndent clients with customized behavior. You can bind one client to a specific filte...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
⏰ 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). (4)
- GitHub Check: Check links
- GitHub Check: runner / linkspector
- GitHub Check: Check internal links
- GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
content/200-orm/200-prisma-client/600-observability-and-logging/250-opentelemetry-tracing.mdx (1)
127-186: LGTM! The removal of the middleware parameter fromPrismaInstrumentation()is cleanly applied across both configuration options, maintaining consistency and clarity.
🍈 Lychee Link Check Report
📊 Results Overview
Errors per inputErrors in 200-orm/800-more/600-help-and-troubleshooting/050-dataguide/02-introduction-to-data-types.mdx
|
🍈 Lychee Link Check Report
📊 Results Overview
|
🍈 Lychee Link Check Report
📊 Results Overview
|
Summary by CodeRabbit