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

Feedback for "Response Query" #122

Closed
fanaugen opened this issue Sep 13, 2024 · 4 comments
Closed

Feedback for "Response Query" #122

fanaugen opened this issue Sep 13, 2024 · 4 comments
Assignees

Comments

@fanaugen
Copy link
Contributor

The last two sections on this page are identical – this doesn’t seem correct.

Or, does this library automatically filter when the anonymous function returns a Boolean, and filter otherwise?

[source]

@ganesh-bruno
Copy link
Collaborator

@ajaishankar Can you help with the query?

@ganesh-bruno ganesh-bruno self-assigned this Oct 23, 2024
@ajaishankar
Copy link
Member

@fanaugen @ganesh-bruno Thanks for pointing this out.

Yes, the library filters if the function returns boolean, maps otherwise.

The example for map in the last section is wrong - it should be

res('..items.amount[?]', amt => amt + 10)

As in the tests here.

The readme is also incorrect here

@ganesh-bruno
Copy link
Collaborator

Hey @ajaishankar thanks for the review.

Yes, the library filters when the function returns a boolean, and maps otherwise.

The example for mapping in the last section is incorrect—it should be:

res('..items.amount[?]', amt => amt + 10)

I'm working on fix.

@ganesh-bruno
Copy link
Collaborator

Hi @fanaugen @ajaishankar ,

We’ve added the correct example in the Response Query Document.

Closing this issue now. If you have any other questions or issues, feel free to reach out.

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

3 participants