Skip to content

Commit e01b7c2

Browse files
committed
fix: hint matching
1 parent 4adf2a5 commit e01b7c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/select-query-parser/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ type ResolveReverseRelationship<
226226
: FoundRelation extends { referencedRelation: infer RelatedRelationName extends string }
227227
? RelatedRelationName extends keyof TablesAndViews<Schema>
228228
? // If the relation was found via hinting we just return it without any more checks
229-
FoundRelation extends { hint?: string }
229+
FoundRelation extends { hint: string }
230230
? {
231231
referencedTable: TablesAndViews<Schema>[RelatedRelationName]
232232
relation: FoundRelation
@@ -414,7 +414,7 @@ export type FindFieldMatchingRelationships<
414414
Schema extends GenericSchema,
415415
Relationships extends GenericRelationship[],
416416
Field extends Ast.FieldNode
417-
> = Field extends { hint?: infer Hint extends string }
417+
> = Field extends { hint: infer Hint extends string }
418418
? FindMatchingHintTableRelationships<
419419
Schema,
420420
Relationships,

0 commit comments

Comments
 (0)