From 96c7856d9209212bddcccf9d76d633a1e599f456 Mon Sep 17 00:00:00 2001 From: Lauren Liberda Date: Tue, 20 Jul 2021 23:34:25 +0200 Subject: [PATCH] fix typos (descendents -> descendants) --- src/items/items.model.ts | 2 +- src/items/items.resolver.ts | 4 ++-- src/items/items.service.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/items/items.model.ts b/src/items/items.model.ts index 0e1f742..29ef4fa 100644 --- a/src/items/items.model.ts +++ b/src/items/items.model.ts @@ -23,5 +23,5 @@ export class ItemModel { children: ItemModel[]; @Field((type) => [ItemModel]) - descendents: ItemModel[]; + descendants: ItemModel[]; } diff --git a/src/items/items.resolver.ts b/src/items/items.resolver.ts index 81d6c95..8cc21a1 100644 --- a/src/items/items.resolver.ts +++ b/src/items/items.resolver.ts @@ -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) diff --git a/src/items/items.service.ts b/src/items/items.service.ts index 0e577e5..98ba123 100644 --- a/src/items/items.service.ts +++ b/src/items/items.service.ts @@ -44,7 +44,7 @@ export class ItemsService { }); } - async getItemDescendents(item: ItemModel): Promise { + async getItemDescendants(item: ItemModel): Promise { const parentItem = await this.itemRepository.findOneOrFail(item.id, { relations: ['parent'], });