I have a question about how to call @ResolveField() category when it is in payload?
getProducts(controls: $controls) {
count
payload {
id
name
category {
name
}
}
}
I'm confused here (code below doesn't work):
// I need something like @ResolveField('payload.category', ...)
@ResolveField('name', () => TypeFunc);
async getCategory(@Parent() product: Product) {
return this.categoryService.getCategory(product.id);
}