docs: improve docs about prisma-client imports#7154
Conversation
|
Warning Rate limit exceeded@nikolasburk has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 18 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughReframes Prisma Client generator docs from a single-file narrative to a multi-file generated output layout, replacing the prior "output splitting" note with an "Importing types" section, adding per-file explanations (client.ts, browser.ts, enums.ts, models.ts, models/.ts, commonInputTypes.ts, internal/*) and updating breaking-change notes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer code
participant Gen as Generated output (multi-file)
participant Runtime as Runtime (Node/Browser)
rect rgba(200,230,255,0.4)
Dev->>Gen: import { PrismaClient } from './generated/prisma/client'
Dev->>Gen: import { PrismaClient } from './generated/prisma/browser'
note right of Gen #ccffcc: Files: client.ts, browser.ts, enums.ts, models.ts, models/<Model>.ts, commonInputTypes.ts, internal/*
end
rect rgba(220,255,220,0.3)
Dev->>Runtime: run (server uses client.ts import)
Dev->>Runtime: run (browser uses browser.ts import)
Runtime-->>Dev: execute with appropriate build/import resolution
end
note over Dev,Runtime #ffd9b3: Explicit import paths recommended due to removal of package.json/export maps
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
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. 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: |
69de745
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://73fdbb47.docs-51g.pages.dev |
| Branch Preview URL: | https://prisma-client-imports.docs-51g.pages.dev |
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx(3 hunks)
🧰 Additional context used
🪛 GitHub Actions: Check all content (MDX) links
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx
[error] 318-318: MDX compilation failed: Expected a closing tag for (318:94-318:105) before the end of paragraph. This caused the Client bundle build to fail. Command: npm run build (Docusaurus build).
🪛 GitHub Actions: Lost Pixel
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx
[error] 318-318: MDX compilation failed. Expected a closing tag for (318:94-318:105) before the end of paragraph. End-tag-mismatch (mdast-util-mdx-jsx).
⏰ 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). (1)
- GitHub Check: runner / linkspector
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (1)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (1)
318-341: Close the inline code ticks around<ModelName>UpdateInput.The inline code span still lacks its closing backtick, so MDX parses
<ModelName>as a tag and the build fails—same issue flagged previously.Apply this diff:
-- Contains all models including their derived utility types like `<ModelName>WhereInput` or `<ModelName>UpdateInput>`. +- Contains all models including their derived utility types like `<ModelName>WhereInput` or `<ModelName>UpdateInput`. ... -- Contains the models including its derived utility types like `<ModelName>WhereInput` or `<ModelName>UpdateInput>`. +- Contains the models including its derived utility types like `<ModelName>WhereInput` or `<ModelName>UpdateInput`.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx(3 hunks)
🧰 Additional context used
🪛 GitHub Actions: Documentation Checks
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx
[error] 367-367: CSpell: Unknown word 'warnin'. fix: 'warning'.
⏰ 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: runner / linkspector
- GitHub Check: Check internal links
- GitHub Check: Lost Pixel
- GitHub Check: Cloudflare Pages
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx (1)
272-274: Quote import specifiers instead of using template literals.These examples still use backtick template literals for import specifiers, which won't compile when copied into TypeScript/ESM code. Please switch them—and the other import snippets below—to normal string literals (e.g.
from "./generated/prisma/client").
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/200-orm/100-prisma-schema/10-overview/03-generators.mdx(3 hunks)
⏰ 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: runner / linkspector
- GitHub Check: Lost Pixel
…risma-client-imports
This PR expands the section about how imports with the new
prisma-clientgenerator work.Summary by CodeRabbit