-
Notifications
You must be signed in to change notification settings - Fork 13
fix: where type issues #958
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
📝 WalkthroughWalkthroughThe pull request introduces changes across several files, primarily affecting the handling of model identifiers and duplicate detection. In Changes
Possibly related PRs
Suggested reviewers
Finishing Touches
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 (
|
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: 2
🧹 Nitpick comments (2)
tools/list-duplicates.ts (2)
29-30
: Remove unused variable 'theWheres' or uncomment the code that uses itThe variable
theWheres
is populated but not utilized since the code that uses it (lines 248-253) is commented out. This may cause confusion and unnecessary memory usage.Consider either removing the unused variable and related code if it's no longer needed, or uncommenting and updating the code block to utilize
theWheres
appropriately.Also applies to: 248-253
124-142
: Clean up commented-out code in 'suffix2' generationIn the
name
method, there is a block of commented-out code regardingnested_suffix
and processing of keys (lines 124-142). Keeping unused code can reduce readability and maintainability.Consider removing the commented-out code to clean up the method:
let suffix2 = if !self.skip_models.is_empty() { - /* let nested_suffix = if self.aggregates { - "_where_with_aggregates" - } else { - "_where" - }; */ let mut keys = self .skip_models .keys() .cloned() .collect::<Vec<_>>(); keys.sort(); format!("_excluding_{}", keys.join("_and_")) } else { "".to_string() };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (20)
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__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 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 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 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 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 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 User.snap
is excluded by!**/*.snap
📒 Files selected for processing (2)
src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs
(4 hunks)tools/list-duplicates.ts
(3 hunks)
⏰ 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 (2)
src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs (2)
20-20
: Assess the impact of changing 'skip_models' key from 'TypeId' to 'String'Changing the key type of
skip_models
fromTypeId
toString
(line 20) may have performance implications due to the costlier string comparisons and potential for key collisions if different models share the same name. In line 64, when accessingskip_models
, ensure that the model names are unique and consistent.Please confirm that model names are unique identifiers in this context and that this change won't introduce unintended side effects. If necessary, consider using a combination of
TypeId
andString
or another unique identifier to maintain performance and correctness.Also applies to: 64-64
Line range hint
78-83
: Ensure 'edges' correctly accumulates dependencies in 'function' caseSimilar to the issue in
listDuplicatesEnhanced
, verify that in thegenerate
method, when constructingedges
, the dependencies for 'function' types include bothinput
andoutput
without overwriting. This ensures proper traversal and processing of type relations.Review the logic around building
edges
to confirm that bothinput
andoutput
dependencies are accounted for correctly.
Awesome, the vivavox typegraph size went down to 1.4mb! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #958 +/- ##
=======================================
Coverage 77.98% 77.98%
=======================================
Files 154 154
Lines 19082 19082
Branches 1929 1929
=======================================
Hits 14882 14882
Misses 4177 4177
Partials 23 23 ☔ View full report in Codecov by Sentry. |
..._core__runtimes__prisma__type_generation__query_where_expr__tests__User__QueryWhereExpr.snap
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.
Very good stuff!
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 (8)
tests/runtimes/prisma/type_duplication.ts (2)
9-9
: Consider renamingnoOfTypes
tonumOfTypes
To improve code readability, consider renaming the variable
noOfTypes
tonumOfTypes
ornumberOfTypes
for clarity.
11-11
: Improve error message for invalidTYPE_COUNT
The error message
"NAN!"
may be unclear. Provide a more descriptive message to indicate thatTYPE_COUNT
must be a valid number.Apply this diff to enhance the error message:
- throw new Error("NAN!"); + throw new Error("Invalid TYPE_COUNT: Not a Number");tests/runtimes/prisma/type_duplication_test.ts (1)
16-16
: Remove unnecessaryconsole.log
statementLogging
raw
may produce extensive output and impact performance. Consider removing this statement if it is no longer needed.Apply this diff to remove the console log:
- console.log(raw);
src/typegraph/core/src/runtimes/prisma/type_generation/out_type.rs (1)
83-87
: Simplify suffix generation in thename
functionThe mapping over
self.skip_rel
can be simplified by removing unnecessary slicing.Apply this diff to streamline the code:
format!( "_excluding_{}", self.skip_rel - .iter() - .map(|owned| &owned[..]) + .iter() .cloned() .collect::<Vec<_>>() .join("_and_") )Alternatively, you can use
as_str
for clarity:format!( "_excluding_{}", self.skip_rel .iter() - .map(|owned| &owned[..]) + .map(|s| s.as_str()) .collect::<Vec<_>>() .join("_and_") )src/typegraph/core/src/runtimes/prisma/type_generation/input_type.rs (1)
221-228
: Consider extracting string manipulation logicThe string manipulation logic in the
name
method could be extracted into a helper function for better readability and reusability.+fn format_skip_rel_suffix(skip_rel: &BTreeSet<String>) -> String { + if skip_rel.is_empty() { + "".to_string() + } else { + format!( + "_excluding_{}", + skip_rel + .iter() + .map(|owned| &owned[..]) + .collect::<Vec<_>>() + .join("_and_") + ) + } +} fn name(&self, _context: &PrismaContext) -> Result<String> { let model_name = self.model_id.name().unwrap().unwrap(); - let suffix = if self.skip_rel.is_empty() { - "".to_string() - } else { - format!( - "_excluding_{}", - self.skip_rel - .iter() - .map(|owned| &owned[..]) - .collect::<Vec<_>>() - .join("_and_") - ) - }; + let suffix = format_skip_rel_suffix(&self.skip_rel); let op = match self.operation { Operation::Create => "create", Operation::Update => "update", }; Ok(format!("{model_name}_{op}_input{suffix}")) }tools/list-duplicates.ts (3)
42-49
: Consider memoizing edge additionsThe
addToRevEdges
function is called frequently during graph traversal. Consider memoizing the results for frequently accessed nodes to improve performance.+const memoizedEdges = new Map<number, number[]>(); + const addToRevEdges = (of: number, idx: number) => { + if (memoizedEdges.has(of)) { + const edges = memoizedEdges.get(of)!; + edges.push(idx); + return; + } const prev = revEdges.get(of); if (prev) { prev.push(idx); + memoizedEdges.set(of, prev); } else { - revEdges.set(of, [idx]); + const edges = [idx]; + revEdges.set(of, edges); + memoizedEdges.set(of, edges); } };
155-162
: Enhance error reportingThe error message could be more descriptive by including the type information and indices in a structured format.
const noMatchError = () => { console.log("no match on dupe reduction", { from: tg.types[from], to: tg.types[to], target: type, }); - return Error("no match on dupe reduction"); + return Error( + `Failed to reduce duplicate: from=${from}(${tg.types[from].type}) ` + + `to=${to}(${tg.types[to].type}) in target=${type.type}` + ); };
271-289
: Consider using an enum for type categoriesThe type categories in
incrementKindCount
could be defined as an enum to prevent typos and improve maintainability.enum TypeCategory { PrismaWhereFilterRelated = 'prismaWhereFilterRelated', PrismaUpdateInputRelated = 'prismaUpdateInputRelated', PrismaCreateInputRelated = 'prismaCreateInputRelated', PrismaOutputRelated = 'prismaOutputRelated' } function incrementKindCount(type: TypeNode, sumMap: Record<string, number>) { if (type.title.match(/_where_/)) { sumMap[TypeCategory.PrismaWhereFilterRelated] = (sumMap[TypeCategory.PrismaWhereFilterRelated] ?? 0) + 1; } // ... similar changes for other categories }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
deno.lock
is excluded by!**/*.lock
📒 Files selected for processing (7)
.ghjk/lock.json
(3 hunks)ghjk.ts
(1 hunks)src/typegraph/core/src/runtimes/prisma/type_generation/input_type.rs
(4 hunks)src/typegraph/core/src/runtimes/prisma/type_generation/out_type.rs
(3 hunks)tests/runtimes/prisma/type_duplication.ts
(1 hunks)tests/runtimes/prisma/type_duplication_test.ts
(1 hunks)tools/list-duplicates.ts
(3 hunks)
🔇 Additional comments (6)
ghjk.ts (1)
112-113
: LGTM! Memory optimization for Rust builds.Setting
RUST_JOBS=8
is a good practice to prevent memory exhaustion during Rust compilation on systems with many cores.Let's verify the impact of this change on build times and memory usage:
✅ Verification successful
Verified: RUST_JOBS=8 is the sole and appropriate parallel jobs configuration
The limit is consistently defined only in ghjk.ts, which is ideal for a project with multiple Rust components. This centralized configuration helps maintain predictable build behavior and memory usage across different environments.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check available cores and current memory usage during Rust builds # Note: This helps validate if the 8-core limit is appropriate for the system # Check total CPU cores echo "Available CPU cores:" nproc # Check memory info echo -e "\nMemory information:" free -h # Look for any existing parallel job configurations in Rust files echo -e "\nExisting parallel job configurations:" rg -g '*.toml' 'jobs|parallel|threads'Length of output: 447
Script:
#!/bin/bash # Search for RUST_JOBS configurations across all files echo "Files containing RUST_JOBS:" rg "RUST_JOBS" -l # Look for Rust configuration files echo -e "\nRust configuration files:" fd -e toml fd "rust-toolchain" fd "rustfmt.toml" fd "cargo.lock" # Check for other environment configurations echo -e "\nOther environment configurations:" rg "RUST_" -lLength of output: 3112
.ghjk/lock.json (1)
Line range hint
1989-2025
: LGTM! Configuration properly synchronized.The lock file changes correctly reflect the addition of the
RUST_JOBS
environment variable in the dev environment configuration.Also applies to: 2074-2074
tests/runtimes/prisma/type_duplication_test.ts (1)
12-12
: Verify increased limits for serialization size and type countThe serialization size limit has been increased eightfold, and the type count limit has been raised from 3,000 to 30,000. Ensure that these changes are intentional and assess their impact on performance and resource usage.
Also applies to: 21-21
src/typegraph/core/src/runtimes/prisma/type_generation/input_type.rs (1)
23-23
: Good choice using BTreeSet for skip_rel!Using
BTreeSet
instead ofVec
is a better choice here as it:
- Ensures uniqueness of relationship names
- Maintains sorted order
- Provides O(log n) lookups for contains checks
tools/list-duplicates.ts (2)
76-78
: Edge handling looks good now!The edge handling in the 'function' case has been fixed to properly store both input and output edges, addressing the issue from the previous review.
36-143
: Consider adding a maximum cycle limitThe while loop could potentially run for a long time on complex type graphs. Consider adding a maximum cycle limit with a warning when reached.
+const MAX_CYCLES = 1000; while (true) { cycleNo += 1; + if (cycleNo > MAX_CYCLES) { + console.warn(`Warning: Maximum cycle count (${MAX_CYCLES}) reached. The type graph might be too complex.`); + break; + } // ... rest of the code }
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
♻️ Duplicate comments (1)
src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs (1)
20-20
:⚠️ Potential issuePrevious review comment about unwrap calls is still valid.
The code still uses double unwrap calls which could lead to panics. Consider using proper error handling as suggested in the previous review.
Also applies to: 35-35, 64-64
🧹 Nitpick comments (8)
tests/runtimes/prisma/type_duplication.ts (3)
9-12
: Improve error message for invalid TYPE_COUNT.The error message "NAN!" is not descriptive enough. Consider providing more context about the expected value.
- throw new Error("NAN!"); + throw new Error(`Invalid TYPE_COUNT value: expected a number but got "${Deno.env.get("TYPE_COUNT")}"`);
13-55
: Add documentation for the relationship generation logic.The relationship generation logic based on even/odd indices is complex and would benefit from detailed documentation explaining:
- Why even/odd indices are used for relationship types
- The significance of the relationship patterns
- The impact of the index-based conditions on the generated schema
+ // Relationship generation rules: + // 1. Even-indexed entities have optional relationships with other even-indexed entities + // 2. Odd-indexed entities have optional relationships with other odd-indexed entities + // 3. Even-indexed entities have list relationships with odd-indexed entities + // 4. Odd-indexed entities have single relationships with even-indexed entities + // This pattern helps test various relationship combinations systematically const entts = Object.fromEntries(enttNames.map(
62-72
: Consider grouping related operations for better maintainability.The root functions could be organized by operation type (read, write, aggregate) for better maintainability.
for (const [key, type] of Object.entries(entts)) { + // Read operations rootFns[`find_unique_${key}`] = prisma.findUnique(type); rootFns[`find_many_${key}`] = prisma.findMany(type); + + // Write operations rootFns[`create_${key}`] = prisma.create(type); rootFns[`create_many_${key}`] = prisma.createMany(type); rootFns[`update_${key}`] = prisma.update(type); rootFns[`update_many_${key}`] = prisma.updateMany(type); rootFns[`delete_${key}`] = prisma.delete(type); rootFns[`delete_many_${key}`] = prisma.deleteMany(type); rootFns[`upsert_${key}`] = prisma.upsert(type); + + // Aggregate operations rootFns[`aggregate_${key}`] = prisma.aggregate(type); rootFns[`group_by_${key}`] = prisma.groupBy(type);src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs (1)
124-142
: Remove commented-out code for suffix generation.The old implementation has been replaced with a new one that sorts keys for consistent naming. The commented-out code can be safely removed as it's no longer needed and is tracked in version control.
- /* let nested_suffix = if self.aggregates { - "_where_with_aggregates" - } else { - "_where" - }; */ - let mut keys = self .skip_models .keys() .cloned() - // .map(|id| id.name().unwrap().unwrap()) - // .map(|name| { - // name.strip_suffix(nested_suffix) - // .map(|str| str.to_owned()) - // .unwrap_or(name) - // }) .collect::<Vec<_>>();tools/list-duplicates.ts (4)
22-28
: Enhance function documentation structure.Consider using JSDoc format for better documentation structure and IDE support.
-// Tries to detect structurally equivalent duplicates by iteratively -// updating composite types to refer to deduped types. -// I.e. optional<A> and optional<B> should be considered duplicates -// if A and B are duplicates of each other. -// This function is not perfect and is not able to detect some -// forms of structural equivalence. Additions to the TypeNode might -// break it. +/** + * Detects structurally equivalent duplicates by iteratively updating composite + * types to refer to deduped types. + * + * @example + * optional<A> and optional<B> are considered duplicates if A and B are duplicates + * + * @limitations + * - Not all forms of structural equivalence can be detected + * - Changes to TypeNode structure might break the detection logic + * + * @param tg - The type graph to analyze + * @param _rootIdx - The starting index for analysis + */
74-217
: Consider extracting type-specific logic into separate functions.The switch statement handling different types is quite long and could be more maintainable if split into separate functions.
+ function handleFunctionType(type: TypeNode, idx: number) { + edges.set(idx, [type.input, type.output]); + addToRevEdges(type.input, idx); + addToRevEdges(type.output, idx); + } + + function handleObjectType(type: TypeNode, idx: number) { + edges.set(idx, Object.values(type.properties)); + for (const dep of Object.values(type.properties)) { + addToRevEdges(dep, idx); + } + } + switch (structure.type) { case "function": - edges.set(idx, [structure.input, structure.output]); - addToRevEdges(structure.input, idx); - addToRevEdges(structure.output, idx); + handleFunctionType(structure, idx); break; case "object": - edges.set(idx, Object.values(structure.properties)); - for (const dep of Object.values(structure.properties)) { - addToRevEdges(dep, idx); - } + handleObjectType(structure, idx); break;
232-241
: Remove commented-out logging code.The commented-out logging code can be safely removed as it's tracked in version control.
- /* const injection = "injection" in fromType - // deno-lint-ignore no-explicit-any - ? ` (injection ${(fromType.injection as any).source})` - : ""; - console.log( - ` ${ - green(fromIdx.toString()) - } ${fromType.type}:${fromType.title}${injection}`, - ); */
271-289
: Extract regex patterns as constants.Consider extracting the regex patterns into named constants for better maintainability and reusability.
+const PATTERNS = { + WHERE_FILTER: /_where_/, + UPDATE_INPUT: /_update_input/, + CREATE_INPUT: /_create_input/, + OUTPUT: /_output/, +} as const; + function incrementKindCount(type: TypeNode, sumMap: Record<string, number>) { - if (type.title.match(/_where_/)) { + if (type.title.match(PATTERNS.WHERE_FILTER)) { const key = "prismaWhereFilterRelated"; sumMap[key] = (sumMap[key] ?? 0) + 1; } - if (type.title.match(/_update_input/)) { + if (type.title.match(PATTERNS.UPDATE_INPUT)) { const key = "prismaUpdateInputRelated"; sumMap[key] = (sumMap[key] ?? 0) + 1; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (20)
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__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 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 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 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 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 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 User.snap
is excluded by!**/*.snap
📒 Files selected for processing (8)
.ghjk/lock.json
(3 hunks)ghjk.ts
(1 hunks)src/typegraph/core/src/runtimes/prisma/type_generation/input_type.rs
(4 hunks)src/typegraph/core/src/runtimes/prisma/type_generation/out_type.rs
(3 hunks)src/typegraph/core/src/runtimes/prisma/type_generation/where_.rs
(4 hunks)tests/runtimes/prisma/type_duplication.ts
(1 hunks)tests/runtimes/prisma/type_duplication_test.ts
(1 hunks)tools/list-duplicates.ts
(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
- ghjk.ts
- tests/runtimes/prisma/type_duplication_test.ts
- src/typegraph/core/src/runtimes/prisma/type_generation/out_type.rs
- src/typegraph/core/src/runtimes/prisma/type_generation/input_type.rs
- .ghjk/lock.json
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: lint-compat (macos-14, aarch64-apple-darwin, false)
- GitHub Check: lint-compat (macos-13, x86_64-apple-darwin, false)
- GitHub Check: pre-commit
My bad, sorry |
- Fixes issues with type counts. --- - [ ] The change comes with new or modified tests - [ ] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change <!-- This is an auto-generated comment: release notes by coderabbit.ai --> - **New Features** - Enhanced duplicate detection mechanism for type graphs. - Improved type identification and relationship tracking. - Added new root functions for dynamic entity management in type duplication. - **Refactor** - Updated model identifier handling in type generation. - Modified key management for skip models from type-based to string-based keys. - Transitioned from static to dynamic entity definitions for scalability. - **Bug Fixes** - Streamlined type duplicate detection logic. - Improved error handling for unsupported type scenarios. - Adjusted assertions for serialization size and type count limits in tests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Migration notes
Summary by CodeRabbit
New Features
Refactor
Bug Fixes