refactor: adjust the types

This commit is contained in:
Zaiste
2021-04-19 15:36:35 +02:00
parent b5e21a54b3
commit 1e946c8b47
6 changed files with 15 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
import { CollectionEdge } from '../schema'
import { CollectionCountableEdge } from '../schema'
import { getConfig, SaleorConfig } from '../api'
import getAllCollectionsQuery from '../utils/queries/get-all-collections-query'
@@ -14,7 +14,7 @@ const getAllCollections = async (options?: {
const edges = data.collections?.edges ?? []
const categories = edges.map(
({ node: { id: entityId, name, slug } }: CollectionEdge) => ({
({ node: { id: entityId, name, slug } }: CollectionCountableEdge) => ({
entityId,
name,
path: `/${slug}`,