-
Notifications
You must be signed in to change notification settings - Fork 890
Added example for "Sparse Fieldsets" #667
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
Conversation
Example demonstrating how `fields` param works.
Yes, but I'm not sure that I understand #670 correctly. The response in the example depends on it. Could you please clarify if we've already resolved the confusion between |
@dgeb is about to submit a PR that puts this issue to bed. Let's revisit after? |
Ok, I'll refactor right after #670 is closed. |
Just closed via #688. |
Sorry, I feel stupid, but still not sure if I get it right ) If |
``` | ||
|
||
Request with `fields` parameter: | ||
|
||
```http | ||
GET /articles?include=author&fields[articles]=title,body&fields[people]=name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relationships must also be included in fields
, even if they're specified via include
. Therefore, the author
field would have to be included in fields[articles]
to get the response below.
In other words, the request would need to be:
GET /articles?include=author&fields[articles]=title,body,author&fields[people]=name
Example demonstrating how
fields
param works.