fix(trpc): create/upsert routers shouldn't be generated for delegate models#1566
fix(trpc): create/upsert routers shouldn't be generated for delegate models#1566
Conversation
WalkthroughWalkthroughThe recent changes introduce enhancements to the tRPC plugin within the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- packages/plugins/trpc/src/generator.ts (2 hunks)
- tests/integration/tests/enhancements/with-delegate/plugin-interaction.test.ts (1 hunks)
Additional comments not posted (3)
tests/integration/tests/enhancements/with-delegate/plugin-interaction.test.ts (1)
26-40: LGTM! Verify schema setup and dependencies.The new test case correctly sets up the schema and loads it with the necessary dependencies.
Ensure that the schema setup and dependencies are correct and sufficient for the test.
packages/plugins/trpc/src/generator.ts (2)
4-4: Verify the necessity and correctness of added imports.The imports for
isDelegateModelandDataModelappear to be necessary for the new functionality.Ensure that these imports are used correctly and are necessary for the changes made.
Also applies to: 13-13
291-295: LGTM! Verify the check for delegate models.The check correctly identifies delegate models and skips create or upsert operations.
Ensure that the logic for identifying delegate models and skipping operations is correct and covers all edge cases.
Also applies to: 300-304
No description provided.