fractal icon indicating copy to clipboard operation
fractal copied to clipboard

parseIncludes ignores sparse field set on included data

Open nivv opened this issue 4 years ago • 1 comments

I'm trying to figure out how to specify which fields to select when including a resource. But I can't get it to work. I've been looking through the Manager-class and I found this:

https://github.com/thephpleague/fractal/blob/a38f0b7cbf82af950ccc5bf6432b35be80698de1/src/Manager.php#L194-L214

Request I'm sending

GET /api-endpoint/producers?include=owner(id|name)

I've also tried the below formats

GET /api-endpoint/producers?include=owner:fields(id|name)
GET /api-endpoint/producers?include=owner:field(id|name)

I found that syntax from another issue: #386

How is it supposed to work?

nivv avatar Dec 09 '19 15:12 nivv