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

Support for filtering empty and not empty relations #44

Open
ErisDS opened this issue Aug 12, 2022 · 0 comments
Open

Support for filtering empty and not empty relations #44

ErisDS opened this issue Aug 12, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ErisDS
Copy link
Member

ErisDS commented Aug 12, 2022

Problem

In Ghost we want to be able to filter posts that have tags, or do not have tags.

Solution

IMO the syntax should be filter=tags:null or filter=tags:-null.

This doesn't cause an error, but it also doesn't do what you'd expect.

filter=tags:null - should return all posts with no tags
filter=tags:-null - should return all posts with at least one tag

Alternatively it could perhaps be done by supporting filtering on counts e.g.

filter=count.tags:0
filter=count.tags:>0

But this I think is a lot less intuitive.

@ErisDS ErisDS added enhancement New feature or request help wanted Extra attention is needed labels Aug 12, 2022
@ErisDS ErisDS changed the title Support for filtering null and not-null relations Support for filtering empty and not empty relations Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant