loopbackio / loopbackio/loopback-next

Filter/Where as a standalone concept

Open
#5,957 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

epic feature
Dominant language
TypeScript
Stars
5.1k
Forks
1.1k
Avg merge
2d 21h
Merged PRs (30d)
27

Description

Refactor the current implementation of LoopBack's Filter to allow other packages to leverage the filtering implementation and/or support LoopBack's Filter syntax.

1. The syntax of Filter/Where objects should be well defined and properly documented, to allow 3rd-party implementations to understand all possible values.

2. There should be TypeScript typings describing Filter, Where, etc., these typings must be accessible independently on `@loopback/repository` (e.g. via a new package).

3. The implementation used by our memory connector should be refactored/extracted into a package that can be used independently from juggler (something like https://www.npmjs.com/package/loopback-filters). It's important to update the connector to use that new package, to ensure there is only single reference implementation.

Nice to have:

- JSON Schema describing Filter syntax
- Some sort of a test suite to allow 3rd-party implementations to verify conformance

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by locating LoopBack's existing Filter/Where implementation and the memory connector in juggler, then review how @loopback/repository exposes its types. Done means the syntax is documented, independent TypeScript typings and a reusable filtering package exist, the memory connector uses the shared implementation, and the proposed JSON Schema or conformance tests are addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design, documentation
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.