Skip to content

Commit eea10bf

Browse files
committed
update
1 parent 466a2f4 commit eea10bf

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/runtime/src/client/executor/name-mapper.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,14 @@ export class QueryNameMapper extends OperationNodeTransformer {
194194
private resolveFieldFromScopes(name: string, qualifier?: string) {
195195
for (const scope of this.modelScopes.toReversed()) {
196196
if (qualifier) {
197-
if (scope.alias && qualifier !== scope.alias) {
198-
continue;
199-
}
200-
if (qualifier !== scope.model) {
201-
continue;
197+
if (scope.alias) {
198+
if (qualifier !== scope.alias) {
199+
continue;
200+
}
201+
} else {
202+
if (qualifier !== scope.model) {
203+
continue;
204+
}
202205
}
203206
}
204207
const modelDef = getModel(this.schema, scope.model);

0 commit comments

Comments
 (0)