Support for filtering empty and not empty relations
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 7
- Avg merge
- 9h 4m
- Merged PRs (30d)
- 22
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named in the issue. Start by locating NQL's relation-filter parsing and query generation, then determine how null and negated-null filters are represented; done means filters for posts with no tags and with at least one tag return the expected sets, with coverage for the chosen syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100