feat: provide support for groupby#10277
Conversation
5154497 to
05ea0ec
Compare
69e9545 to
24cce3f
Compare
d067241 to
e0a6d93
Compare
packages/rest/src/writer.ts
Outdated
| // TODO(ritch) remove this, should be configurable | ||
| // See https://github.com/loopbackio/loopback-next/issues/436 | ||
| response.setHeader('Content-Type', 'application/json'); | ||
| // let customResult = result; |
There was a problem hiding this comment.
why is this commented ? can you check please ?
There was a problem hiding this comment.
This is a mistake. I'd fix it.
samarpanB
left a comment
There was a problem hiding this comment.
I am not able to figure out what will the type returned for this method. groupBy is tricky because it can't return model array anymore so it will fail typings. Also I dont see repository related changes. Can you please add an end to end test here to confirm, its working end to end with repository ?
b721132 to
d344824
Compare
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
d344824 to
834539b
Compare
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
|
Hi, @samarpanB. The returned response of a group by filter should be an array of the models. I have added a test in one of the examples (todo-list). But the test fails due to missing changes from this and this PR. The test works fine locally if the changes are there from these PRs. |
Currently, loopback 4 doesn't support Groupby. This PR provides support for that.
Related PRs:
Checklist
npm testpasses on your machinepackages/cliwere updatedexamples/*were updated👉 Check out how to submit a PR 👈