Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: sparse fieldsets on nested endpoints #748

Closed
bart-degreed opened this issue May 12, 2020 · 0 comments · Fixed by #792
Closed

Feature: sparse fieldsets on nested endpoints #748

bart-degreed opened this issue May 12, 2020 · 0 comments · Fixed by #792

Comments

@bart-degreed
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant