fix typos (descendents -> descendants)

master
Lauren Liberda 2021-07-20 23:34:25 +02:00
parent 9e22638fc2
commit 96c7856d92
3 changed files with 4 additions and 4 deletions

View File

@ -23,5 +23,5 @@ export class ItemModel {
children: ItemModel[];
@Field((type) => [ItemModel])
descendents: ItemModel[];
descendants: ItemModel[];
}

View File

@ -36,8 +36,8 @@ export class ItemsResolver {
}
@ResolveField()
async descendents(@Parent() item: ItemModel) {
return this.itemsService.getItemDescendents(item);
async descendants(@Parent() item: ItemModel) {
return this.itemsService.getItemDescendants(item);
}
@Mutation((returns) => ItemModel)

View File

@ -44,7 +44,7 @@ export class ItemsService {
});
}
async getItemDescendents(item: ItemModel): Promise<Item[]> {
async getItemDescendants(item: ItemModel): Promise<Item[]> {
const parentItem = await this.itemRepository.findOneOrFail(item.id, {
relations: ['parent'],
});