fix(codegen): filter conflict detection by configured schemas & preserve db config merging#721
Merged
pyramation merged 2 commits intomainfrom Feb 15, 2026
Conversation
fix(graphile-settings): resolve function/table resource name collisions - Add functionResourceName override to InflektPlugin to restore schema prefixes for functions while keeping clean names for tables - Filter ConflictDetectorPlugin by configured pgServices.schemas to prevent false-positive warnings from unrelated schemas - Deep-merge db config in codegen CLI to preserve file config db fields - Use filterDefined in buildDbConfig to strip undefined values
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Mar 31, 2026
…design - Move node-type-registry from graphile/ to graphql/ folder - Remove 'ref' field from BlueprintTable (table_name IS the identifier) - Add optional 'schema_name' to BlueprintTable, BlueprintIndex, BlueprintFullTextSearch - Rename source_ref/target_ref to source_table/target_table in BlueprintRelation - Add optional source_schema_name/target_schema_name to BlueprintRelation - Add BlueprintUniqueConstraint type (table_name, columns[], optional schema_name) - Add unique_constraints[] to BlueprintDefinition - Update codegen (generate-types.ts) to produce the new shapes - Update generated blueprint-types.generated.ts to match - Update README with new example (no ref, uses table_name directly) - Update all path references from graphile/ to graphql/ Corresponds to constructive-db PR #721 which implements the server-side blueprint redesign (remove refs, add table_name+schema_name resolution, extract construction state, add unique_constraints phase).
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(codegen): filter conflict detection by configured schemas & preserve db config merging
Summary
Clean extraction of functional changes from #720, with all linting/formatting-only changes removed.
ConflictDetectorPlugin (
conflict-detector.ts): Filters codec conflict detection to only check schemas listed inpgServices.schemas, preventing false-positive warnings from unrelated schemas.Codegen CLI (
index.ts,shared.ts): Fixesdbconfig merging so file-configdbfields (e.g.,pgpmsettings) aren't silently dropped when CLI args also contributedbproperties. Also wrapsbuildDbConfigoutput withfilterDefinedto preventundefinedvalues from overwriting real config during merge.Updates since last revision
functionResourceNameoverride fromInflektPlugin— all resource names (tables and functions) remain flat with no schema prefixes, per project convention.Review & Testing Checklist for Human
(build as any).resolvedPreset?.pgServicesin conflict-detector is the correct path to access configured services at schema build time — this uses ananycast and the path may not be stable across PostGraphile versionsdb.pgpmsettings and CLI passes--schemas— confirmdb.pgpmis preserved in the merged configdbmerge ({ ...fileConfig.db, ...merged.db }) is sufficient — ifdbcontains nested objects beyondschemas/apiNames/pgpm, they would be overwritten rather than mergedfilterDefinedinbuildDbConfigdoesn't break downstream consumers that may distinguish between a key beingundefinedvs. absentNotes
functionResourceName), with all quote style ('→") and whitespace/formatting diffs removedcustom-inflector.tsis intentionally unchanged — no schema prefixes on functions or tablesLink to Devin run: https://app.devin.ai/sessions/741db16bcb8b43eaa343b3a5befd80c1
Requested by: @pyramation