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

Resource response on query request #127

Closed
jirenius opened this issue Oct 23, 2019 · 1 comment
Closed

Resource response on query request #127

jirenius opened this issue Oct 23, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jirenius
Copy link
Collaborator

jirenius commented Oct 23, 2019

Issue

A query request can currently only be responded to with an array of events.

It is a complex task to produce these events based on the state when the query event was sent.

To make it easier for service development, the service should have the option to respond with a resource instead. The resource response would then be compared to the cached version of the resource in order to produce the events leading up to the new state.

Notes

The RES Service Protocol - Query Request should be extended with the description below:

Result

events
An array of events for the query resource.
MUST be an array of event query objects
May be omitted if there are no events.
Must be omitted if model or collection is provided.

model
An object containing the named properties and values of the model.
Must be omitted if events or collection is provided.
Must be omitted if the query resource is not a model.

collection
An ordered array containing the values of the collection.
Must be omitted if events or model is provided.
Must be omitted if the query resource is not a collection.

Compatibility

  • Only RES Service protocol would be affected
  • Would require a PATCH version update to the RES Protocol
  • Would be backwards compatible with older services
@jirenius jirenius added the enhancement New feature or request label Oct 23, 2019
@jirenius jirenius self-assigned this Oct 23, 2019
jirenius added a commit that referenced this issue Oct 24, 2019
…se-on-query-request

Feature/gh 127 resource response on query request
@jirenius
Copy link
Collaborator Author

Resolved in #131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant