Skip to content

Commit 9400bde

Browse files
committed
Use the field name in the graphql query instead of model name
1 parent 920dced commit 9400bde

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/vuex-orm-apollo.esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7954,7 +7954,7 @@ var QueryBuilder = /** @class */ (function () {
79547954
!_this.shouldModelBeIgnored(relatedModel, ignoreModels)) {
79557955
var multiple = !(field instanceof _this.context.components.BelongsTo ||
79567956
field instanceof _this.context.components.HasOne);
7957-
relationQueries.push(_this.buildField(relatedModel, multiple, undefined, ignoreModels));
7957+
relationQueries.push(_this.buildField(relatedModel, multiple, undefined, ignoreModels, name));
79587958
}
79597959
});
79607960
return relationQueries.join('\n');

src/queryBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export default class QueryBuilder {
288288
const multiple: boolean = !(field instanceof this.context.components.BelongsTo ||
289289
field instanceof this.context.components.HasOne);
290290

291-
relationQueries.push(this.buildField(relatedModel, multiple, undefined, ignoreModels));
291+
relationQueries.push(this.buildField(relatedModel, multiple, undefined, ignoreModels, name));
292292
}
293293
});
294294

0 commit comments

Comments
 (0)