Skip to content

[jsonapi] Introduce partialSet request option#883

Merged
dgeb merged 1 commit into
mainfrom
jsonapi-partial-set
Aug 12, 2021
Merged

[jsonapi] Introduce partialSet request option#883
dgeb merged 1 commit into
mainfrom
jsonapi-partial-set

Conversation

@dgeb

@dgeb dgeb commented Aug 12, 2021

Copy link
Copy Markdown
Member

The partialSet request option provides explicit control over whether the resultset in a successful response should be interpreted as a partial set of related records. Currently, this option only applies to requests for related records.

Example usage: A request is made to a custom relationship url and you want the records returned to be added to the relationship, rather than to replace all existing members of that relationship.

If this property is not set, then data will be implicitly treated as a partial set of related records if:

  • a filter option is present in the request
  • a page option is present in the request
  • a prev or next link is present in the response document's top-level links object.

The `partialSet` request option provides explicit control over whether the resultset in a successful response should be interpreted as a partial set of related records. Currently, this option only applies to requests for related records.

Example usage: A request is made to a custom relationship `url` and you want the records returned to be added to the relationship, rather than to replace all existing members of that relationship.

If this property is not set, then `data` will be implicitly treated as a partial set of related records if:

- a `filter` option is present in the request
- a `page` option is present in the request
- a `prev` or `next` link is present in the response document's top-level `links` object.
@dgeb
dgeb force-pushed the jsonapi-partial-set branch from adcb825 to 855ff78 Compare August 12, 2021 11:57
@dgeb
dgeb merged commit 9cafe2f into main Aug 12, 2021
@dgeb
dgeb deleted the jsonapi-partial-set branch August 12, 2021 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant