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/wip filtering relationship #73

Merged
merged 8 commits into from
Jun 23, 2020

Conversation

cecemel
Copy link
Contributor

@cecemel cecemel commented May 15, 2020

As a try-out, I extend the fuzzy matching on relationship. The rest of the filters still need implementation.

Contrary to what I proposed in #60, I changed filter[author.posts] to filter[author:posts]. Ember.js (considered baseline use case) doesn't like parsing the former.

So a call would be
/authors?filter[posts:title][fuzzy-match]=milk

See also #34 and #60 and fortunejs/fortune-postgres#35

cecemel added 3 commits May 8, 2020 18:27
Notes
-----
Regarding integration into fortune.js

I am unsure what field of request.options may be used.
As I understand it, Adapter.find leaves the possibility of extra
fields on the options object unspecified. Therefore, I added the
fuzzyMatch on the ptions object.

Regarding validity JSON:API

Filtering is relatively unspecified. As such, I assume the extra filter
type is legal.
Copy link
Member

@gr0uch gr0uch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks fine, but can you run test please? I think you should also add a test case here to check that it will make the right request.

- It relies on a unrelease version of fortune.js to make it run.
@cecemel
Copy link
Contributor Author

cecemel commented Jun 18, 2020

I think I covered all your comments.
To make the unit test work, I had to make an implementation of the memory store.
See fortunejs/fortune#321

Let me know what you think.
thx

@gr0uch gr0uch merged commit d721070 into fortunejs:master Jun 23, 2020
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

Successfully merging this pull request may close these issues.

2 participants