fix typos (descendents -> descendants)

This commit is contained in:
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[]; children: ItemModel[];
@Field((type) => [ItemModel]) @Field((type) => [ItemModel])
descendents: ItemModel[]; descendants: ItemModel[];
} }

View file

@ -36,8 +36,8 @@ export class ItemsResolver {
} }
@ResolveField() @ResolveField()
async descendents(@Parent() item: ItemModel) { async descendants(@Parent() item: ItemModel) {
return this.itemsService.getItemDescendents(item); return this.itemsService.getItemDescendants(item);
} }
@Mutation((returns) => ItemModel) @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, { const parentItem = await this.itemRepository.findOneOrFail(item.id, {
relations: ['parent'], relations: ['parent'],
}); });