From 29248f89c940f6cc999b23a3b4338958020f1443 Mon Sep 17 00:00:00 2001 From: serafettin Date: Wed, 31 Jan 2024 11:38:21 +0100 Subject: [PATCH] Update item.js --- api/src/services/item.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/services/item.js b/api/src/services/item.js index 7a3893a6..2527f389 100644 --- a/api/src/services/item.js +++ b/api/src/services/item.js @@ -193,7 +193,10 @@ export class ItemService { return { endCursor: data.indexItemIndex.pageInfo.endCursor, - items: data.indexItemIndex.edges.map(e => e.node.item), + items: data.indexItemIndex.edges.map(({ node: { item: { __typename: type, ...rest } } }) => ({ + type, + node: rest + })), } } catch (error) {