Skip to content

Feature: sparse fieldsets on nested endpoints #748

Closed
@bart-degreed

Description

@bart-degreed

Sparse fieldset selection on nested endpoints is currently not supported. For example, this request:

GET /blogs/1/articles?fields=title

fails with:

{
  "errors": [
    {
      "id": "ab2895f8-e681-4583-9f0a-ac2c124aeae8",
      "status": "400",
      "title": "The specified query string parameter is currently not supported on nested resource endpoints.",
      "detail": "Query string parameter 'fields' is currently not supported on nested resource endpoints. (i.e. of the form '/article/1/author?parameterName=...')",
      "source": {
        "parameter": "fields"
      }
    }
  ]
}

Similar to #747, we should be able to support nested endpoints, as well as fields selection on deeply included relationships, for example:

GET /blogs/1/articles?include=author.livingAddress&fields=url&fields[author]=firstName&fields[author.livingAddress]=street

and:

GET /articles?include=author.livingAddress&fields=url&fields[author]=firstName&fields[author.livingAddress]=street

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions