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 Request - Summarize Batch Results #99

Open
sokulski opened this issue May 4, 2021 · 1 comment
Open

Feature Request - Summarize Batch Results #99

sokulski opened this issue May 4, 2021 · 1 comment

Comments

@sokulski
Copy link

sokulski commented May 4, 2021

I'd like to propose a response for batch requests similar to the pagination response that is provided for "find" methods.

I've implemented the following as a hook and found it very useful in quickly summarizing the results of a batch request via the REST API.

[
  total: 2,
  fulfilled: 1,
  rejected: 1,
  data: {
      "status": : "fulfilled",
      "value": { /* user object returned by app.service('users').get(1) */ } 
    }, {
      "status": : "rejected",
      "reason": { /* error JSON or object with error message */ } 
    }
]

I'd like to know if this is something that would be deemed outside the scope (and solvable easily with a hook) or perhaps would this run afoul of some other Feathers ethos.

Thank you.

@sokulski sokulski changed the title Feather Request - Summarize Batch Results Feature Request - Summarize Batch Results May 4, 2021
@DaddyWarbucks
Copy link

IMHO this is easily solvable with a hook. In fact, I think your solution is absolutely in line with the Feathers ethos.

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

No branches or pull requests

2 participants