feat: add JavaScript query builder library for Dappi - #380
Open
francedermaz wants to merge 5 commits into
Open
Conversation
francedermaz
marked this pull request as ready for review
August 7, 2026 23:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed?
Added
dappi-query-js, a dependency-free TypeScript library that builds Dappi-compatible query strings with a fluent API. It covers filtering, sorting, pagination, search and field shaping, mapping directly to what the generated list endpoints expect (filter[...],SortBy/SortDirection,Offset/Limit,SearchTerm,fields,include).Why?
Building these query strings by hand is error-prone: the bracket syntax, operation tokens and nested field paths are easy to get wrong, and there was no client-side helper for it. This gives consumers a typed, ergonomic way to construct filters that matches the server-side parsing exactly.
Closes #351
Type of Change
How Did You Test This?
What I tested:
CollectionFilter, asserting each key decodes back to the intended filter (fields, operator, operation, value).tsctype-check and build pass withstrictmode.How to test it:
cd dappi-query-jsnpm installnpm testReview Checklist
Screenshots / Additional Context
Placed at the repo root as
dappi-query-js/(alongsideCCUI.DAPPI), sincepackages/is git-ignored. Ships as TypeScript with aREADME.mddocumenting the full operation set and usage. Zero runtime dependencies;vitestandtypescriptare the only dev dependencies.