Launched March 18, 2025
Pocketbase Query

Pocketbase Query

Simplify Your PocketBase Queries

FreeOpen SourceFrameworkHelpers4,771 impressions#7 of its week

Hey DevHunt, I'm developer of the Pocket Query 👋 I'm thrilled to announce the launch of the PocketBase Query library! Over the past few years, I've been using PocketBase for various projects, and I often faced challenges when creating queries for the PocketBase backend. To address this, I decided to develop an internal tool for one of my projects and make it available to all developers. What is PocketBase Query? 🤔 PocketBase Query is an open-source library designed to simplify the process of building queries and making it effortless, and expressive. Built with developers in mind, it provides a fluent, type-safe API that makes constructing complex queries a breeze no more messy string concatenation or error-prone manual setups! 🔥 Why You'll Love It 💖 Fluent API: Craft queries using intuitive, chainable methods that read like plain English. 📝 Type Safety: Leverage TypeScript for early error detection and a more robust development experience. 🔒 Simplified Complexity: Easily build advanced queries with nested conditions, filters, and sorting—without the hassle. 🔍 Seamless Integration: Designed specifically for PocketBase, it fits right into your workflow to boost productivity. ⚙️ Open-Source and Community Driven 🌍 PocketBase Query is MIT-licensed and hosted on GitHub, welcoming contributions from developers of all levels. Whether you're looking to improve query logic or extend functionality, your input helps make the tool even better for the community. 🤝 Get Started Today! 🚀 Pocketbase Query covers every case of the Pocketbase backend-supported queries even in v0.2.0, It's ready to use. You can say goodbye to query headaches and hello to a more productive development process. Try out PocketBase Query, integrate it into your projects, and share your feedback. Let’s build something amazing together! 🌟

PocketBase Query is a TypeScript library that provides a fluent, type-safe API to build PocketBase filter queries.

for
TypeScript/JavaScript developers using PocketBase
pricing
open source
license
MIT
emresandikci/pocketbase-query 60 1TypeScriptupdated a year ago
works withPocketBaseTypeScriptJavaScriptnpm

Key features

6 features of Pocketbase Query
  • Fluent chainable API — Build queries with intuitive, chainable methods that read like plain English.
  • Type safety — Leverages TypeScript to catch errors at compile time.
  • Rich operators — Supports equality, inequality, range, LIKE, array and custom operators.
  • Logical grouping — Combine conditions with AND/OR and group them using brackets.
  • Singleton instance — Provides a single reusable query builder via getInstance().
  • Build & reset — generate the final query string with build() which also clears internal state.

Use cases

  • Create complex filter strings for PocketBase collections without manual string concatenation
  • Implement dynamic search filters in a TypeScript front-end app
  • Generate reusable query snippets for server-side PocketBase requests
  • Compose nested conditions and brackets for advanced data retrieval

Pocketbase Query FAQ

How do I install PocketBase Query?+

Run npm i @emresandikci/pocketbase-query and import it in your code.

How do I obtain a query builder instance?+

Call PocketbaseQuery.getInstance<YourType>() which follows the singleton pattern.

Can I add custom filter strings?+

Yes, use the customFilter(filter:string) method to inject any raw filter.

Does the library support array fields?+

The anyEqual and in methods handle equality and OR conditions for array fields.

What license is the library released under?+

It is released under the MIT License and is free to use and contribute to.

Is the query state cleared after building?+

Calling build() returns the query string and resets the internal state.

Summarized by DevHunt from github.com · Sep 28, 2026. Details may change; check the official site.