-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix(typegraph): prisma where fields types #975
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe changes introduce significant updates to the Changes
Sequence Diagram(s)sequenceDiagram
participant WG as Where Generator
participant SF as StringFilter
WG->>SF: Instantiate StringFilter with prop.prop_type
SF->>SF: Call generate() using the format
SF->>SF: Compose name() using format value
SF-->>WG: Return generated filter
sequenceDiagram
participant Test as Test Suite
participant Prisma as Prisma Engine
participant DB as Database
Test->>Prisma: Initialize engine with connection string
Test->>DB: Drop existing schemas and reapply migrations
Test->>Prisma: Send findRecord query with invalid UUID
Prisma->>DB: Validate query input
DB-->>Prisma: Return error for invalid UUID format
Prisma-->>Test: Return 400 error with detailed message
Possibly related PRs
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
0f71084
to
87e2527
Compare
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 (2)
tests/runtimes/prisma/invalid_query_test.ts (2)
24-26
: Fix typo in error message.The error message contains a typo: "statisfy" should be "satisfy".
- "string does not statisfy the required format 'uuid'", + "string does not satisfy the required format 'uuid'",
15-28
: Consider adding more test cases.The test could be expanded to cover more edge cases for string validation:
- Empty string
- Special characters
- Different UUID formats
await t.should("validate string types in where", async () => { + // Test empty string + await gql` + query { + findRecord(where: { id: "" }) { + id + } + } + ` + .expectStatus(400) + .expectErrorContains( + "string does not satisfy the required format 'uuid'", + ) + .on(e); + + // Test special characters + await gql` + query { + findRecord(where: { id: "!@#$%^&*()" }) { + id + } + } + ` + .expectStatus(400) + .expectErrorContains( + "string does not satisfy the required format 'uuid'", + ) + .on(e); + await gql` query { findRecord(where: { id: "invaliduuid" }) { id } } ` .expectStatus(400) .expectErrorContains( "string does not satisfy the required format 'uuid'", ) .on(e); });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (27)
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Post out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Record out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many User out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Post out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Record out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique User out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Post out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Record out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by User out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_many Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_many Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_many User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_one Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_one Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_one User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__where___test__where Post.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__where___test__where Record.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__where___test__where User.snap
is excluded by!**/*.snap
📒 Files selected for processing (4)
src/typegate/src/engine/typecheck/input.ts
(3 hunks)src/typegraph/core/src/runtimes/prisma/type_generation/filters.rs
(2 hunks)src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs
(2 hunks)tests/runtimes/prisma/invalid_query_test.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- src/typegate/src/engine/typecheck/input.ts
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: bulid-docker (linux/arm64, custom-arm)
- GitHub Check: test-full
- GitHub Check: lint-compat (macos-14, aarch64-apple-darwin, false)
- GitHub Check: bulid-docker (linux/amd64, custom-ubuntu-large)
- GitHub Check: lint-compat (macos-13, x86_64-apple-darwin, false)
- GitHub Check: pre-commit
🔇 Additional comments (4)
src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs (1)
89-103
: LGTM! Improved type safety with explicit type_id.The changes enhance type safety by explicitly passing
type_id
toStringFilter
. This ensures proper type validation for string fields.src/typegraph/core/src/runtimes/prisma/type_generation/filters.rs (3)
115-117
: LGTM! Enhanced StringFilter with type_id.The addition of
type_id
field makes theStringFilter
more flexible by allowing external type specification.
121-122
: LGTM! Proper type_id usage.The code correctly uses the struct's
type_id
field for type generation.
146-146
: LGTM! Unique filter names.The name method now generates unique filter names by incorporating the
type_id
, preventing potential naming conflicts.
src/typegraph/core/src/runtimes/prisma/type_generation/filters.rs
Outdated
Show resolved
Hide resolved
Also do you guys think we should reuse other scalar types? |
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
🧹 Nitpick comments (1)
src/typegraph/core/src/runtimes/prisma/type_generation/filters.rs (1)
153-154
: Consider tracking the full text search feature.The TODO comment indicates a missing feature for full text search that depends on a preview feature.
Would you like me to create an issue to track the implementation of the full text search feature?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (35)
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__query_where_expr__tests__Post__QueryWhereExpr.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__query_where_expr__tests__User__QueryWhereExpr.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__create_many Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__create_many Post out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__create_many User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__create_many User out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__create_one Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__create_one User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Post out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Record out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many User out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Post out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Record out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique User out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Post out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Record out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by User out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_many Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_many Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_many User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_one Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_one Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_one User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__where___test__where Post.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__where___test__where Record.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__where___test__where User.snap
is excluded by!**/*.snap
📒 Files selected for processing (2)
src/typegraph/core/src/runtimes/prisma/type_generation/filters.rs
(5 hunks)src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: lint-compat (macos-14, aarch64-apple-darwin, false)
- GitHub Check: lint-compat (macos-13, x86_64-apple-darwin, false)
- GitHub Check: test-full
- GitHub Check: pre-commit
🔇 Additional comments (3)
src/typegraph/core/src/runtimes/prisma/type_generation/filters.rs (3)
68-77
: LGTM! Well-structured constructor.The
from_type
constructor provides a clean way to create filters from number types, with clear type mapping.
133-135
: LGTM! Clean struct definition.The struct is well-focused with a single responsibility.
355-358
: LGTM! Proper use of new constructor.The function correctly uses the new
from_type
constructor and maintains proper error handling.
src/typegraph/core/src/runtimes/prisma/type_generation/filters.rs
Outdated
Show resolved
Hide resolved
Oh, looking at the diff I think I did something wrong |
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.
Nice catch!
2f1186d
to
3e1b0ee
Compare
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)
src/typegraph/schema/src/runtimes/prisma.rs (1)
77-79
: Add tests for string type representations.Since
StringType
is used inScalarType::String
and its string representation is crucial for schema generation, consider adding tests to verify the correct string output for each variant.Would you like me to help generate test cases for the
Display
implementation? Here's an example of what could be added:#[cfg(test)] mod tests { use super::*; #[test] fn test_string_type_display() { assert_eq!(StringType::Plain.to_string(), "string"); assert_eq!(StringType::Uuid.to_string(), "uuid"); assert_eq!(StringType::DateTime.to_string(), "date-time"); } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (27)
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Post out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many Record out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_many User out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Post out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique Record out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__find_unique User out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Post out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by Record out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__group_by User out.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_many Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_many Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_many User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_one Post inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_one Record inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__test__update_one User inp.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__where___test__where Post.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__where___test__where Record.snap
is excluded by!**/*.snap
src/typegraph/core/src/runtimes/prisma/type_generation/snapshots/typegraph_core__runtimes__prisma__type_generation__where___test__where User.snap
is excluded by!**/*.snap
📒 Files selected for processing (3)
src/typegraph/core/src/runtimes/prisma/type_generation/filters.rs
(3 hunks)src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs
(2 hunks)src/typegraph/schema/src/runtimes/prisma.rs
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs
- src/typegraph/core/src/runtimes/prisma/type_generation/filters.rs
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: lint-compat (macos-14, aarch64-apple-darwin, false)
- GitHub Check: lint-compat (macos-13, x86_64-apple-darwin, false)
- GitHub Check: test-full
- GitHub Check: pre-commit
🔇 Additional comments (1)
src/typegraph/schema/src/runtimes/prisma.rs (1)
60-68
: Add documentation for the Display implementation.The implementation looks good and follows best practices. Consider adding documentation to explain the purpose and usage of these string representations.
Add documentation above the implementation:
+/// Implements Display for StringType to provide string representations +/// that align with Prisma's type format specifications. +/// - Plain -> "string" +/// - Uuid -> "uuid" +/// - DateTime -> "date-time" impl std::fmt::Display for StringType {Let's verify that these string representations align with Prisma's expectations:
Migration notes
Summary by CodeRabbit
New Features
format
field in theStringFilter
, allowing for customized string type definitions.StringType
variants, improving clarity in type handling.Tests