Skip to content
This repository was archived by the owner on Jul 14, 2022. It is now read-only.
This repository was archived by the owner on Jul 14, 2022. It is now read-only.

How can I get a specific value from subCategory list #1110

@cyrilmarceau

Description

@cyrilmarceau

Hello,

I'm trying to retrieve the backgroundImage property from a subcategory (I want get the details of subcategory)

So I fetch from the children API but I don't but by default I get these properties:

So in pages/category/[slug].ts:
api.categories.getChildren({ first: 100, id }).then(({ data }) => data),

id: "Q2F0ZWdvcnk6NTk="
name: "Sofas"
seoDescription: ""
seoTitle: ""
slug: "canapes"
__typename: "Category"

Where in the code should I specify the other values ​​I want to retrieve?

my expected result would be:

id: "Q2F0ZWdvcnk6NTk="
name: "Sofas"
seoDescription: ""
seoTitle: ""
slug: "canapes"
backgroundImage: {
url: "",
alt: ""
}
__typename: "Category"

because in the sdk the query allowing to retrieve the children of a category, by default it does not retrieve the backgroundImage property

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions