Start your All-Access Pass to unlock this challenge
Challenge 1 / 1
Suppose we have a Product entity with the following category property:
#[ApiResource(normalizationContext: ['groups' => 'product:read']]
class Product
{
// ...
#[Groups('product:read')]
public Category $category;
}
Also assume the Category class has #[ApiResource]. If someone makes a GET request to /api/products/1, what will the category field look like?
Skip challenges and go to theNext Chapter