Playground API
DocsStatsBlogStudio
Documentation Tree
Technical BlogFeature Deep Dives
  • Introduction
  • Quickstart
    5 min
  • How It Works
  • Recipes & Cookbooks
  • Platform Comparisons
  • Real-World Showcase
  • Interactive Studio
    Studio
  • GraphiQL IDE
    IDE
  • Session Quotas & Activity
  • Network Chaos Simulator
  • Atomic Sandbox Reset
  • Overview & Models
    Hub
  • Users Resource
  • Posts Resource
  • Comments Resource
  • Todos Resource
  • Custom Collections
    Custom
  • Multipart File Uploads
    Upload
  • Dynamic SVG Avatars
    SVG
  • Image Thumbnails
    CDN
  • Relational Filtering
  • Full-Text Search
  • Dynamic Sorting
  • Offset Pagination
  • Cursor Pagination
    Scroll
  • CSV & Excel Export & Import
    IO
  • Custom Collections
    CRUD
  • Overview & Architecture
    Hub
  • JWT Auth Flow
  • Refresh Token Rotation
    Mutex
  • RBAC Permission Matrix
    Roles
  • Expiry Simulation
  • Clock Skew Drift
  • Password Recovery Loop
  • Dual-Mode Sandboxing
  • GraphiQL IDE
    IDE
  • Relational Queries
  • Stateful Mutations
  • Realtime Subscriptions
  • Overview & Flowcharts
    Hub
  • Hosted Checkout
    Stripe
  • Payment Intents API
  • 3DS Challenge Modal
    Modal
  • Customers Vault
  • Charges & Refunds
  • Test Cards Catalog
  • Overview & Channels
    Hub
  • Virtual Email Mailbox
    Mailtrap
  • Virtual SMS Terminal
    Phone
  • In-App Notifications
  • Message Dispatcher
  • Realtime Studio
    Studio
  • Native WebSocket (/ws)
  • Socket.io Gateway
  • Presence & Echo Bot
  • Server-Sent Events (SSE)
    SSE
  • Analytics Telemetry
  • Webhook Subscriptions
  • HMAC SHA-256 Signatures
  • Delivery Logs
  • Manual Retry Simulator
  • Network Latency Delay
  • HTTP Status Codes
  • Rate-Limit Simulator
    429
  • Flaky Network & Jitter
    Chaos
  • Session Quotas & Activity
  • JSON Snapshots
    JSON
  • Headless CI/CD Testing
    CI
  • Mobile QR Code Sync
  • System Metrics & Health
  • Atomic Sandbox Reset
  • Official TypeScript SDK
  • Multi-Language Generators
  • DevTools Extension
  • OpenAPI 3.1 Spec
    JSON
  • Postman Collection v2.1
  • Bruno Collection
  • Insomnia Workspace
  • TypeScript .d.ts
    .d.ts
  • AI Prompt Rules
    Rules
  • Context Index (llms.txt)
  • Full Schema (llms-full.txt)
  • Manifest (product.json)
  • All Feature Articles
    Blog
  • React CRUD Without Backend
    Deep Dive
  • Why Static APIs Fail
  • Mocking Stateful Auth
  • WebSockets & SSE Guide
Technical Blog
Articles

In-depth articles explaining stateful mock APIs, WebSockets, payments, and frontend resilience.

Read Articles
PreviousImage Thumbnails
NextFull-Text Search
Data & Query Engine

Relational Filtering

Query records by exact property values, foreign keys, nested object paths, and boolean status flags. Query filters are automatically parsed, type-coerced, and evaluated in memory against your active session overlay.

Filter Query Builder

Pick a preset scenario or test custom query parameters against the live API:

Author Foreign Key

Matches exact foreign key userId=1 across all merged global and session-created blog posts.

GET /posts?userId=1
userId1
Coerced to integer matching posts authored by user 1
Method: GET

Live Request Console

GET
response.json
1
{
2
// Click "Send" above to execute this request against the live server.
3
}

Type Coercion & Evaluation Rules

Because URL query parameters are inherently strings, the engine automatically detects and coerces values before filtering.

Filter TypeExample QueryCoerced TypeEvaluation Logic
Integer / Foreign Key?userId=1NumberStrict numeric comparison (item.userId === 1).
Boolean Flag?completed=trueBooleanCoerces "true"|"false" to strict boolean values.
String / Category?category=LaptopsStringCase-insensitive exact string match across record values.
Nested Dot-Notation?address.city=GwenboroughDeep ObjectSafely traverses nested JSON objects without throwing null references.
Compound Logical AND?userId=1&completed=falseMultipleAll specified query filters must evaluate to true simultaneously.

Client Integration Recipes

Clean code patterns for dynamic query parameters in production applications:

hooks/useFilteredPosts.ts
1
// hooks/useFilteredResources.ts
2
import { useState, useEffect } from 'react';
3
4
export function useFilteredPosts(userId?: number) {
5
const [posts, setPosts] = useState([]);
6
const [loading, setLoading] = useState(true);
7
8
useEffect(() => {
9
const params = new URLSearchParams();
10
if (userId !== undefined) {
11
params.set('userId', String(userId));
12
}
13
14
const url = https://playground.nileslabs.com/api/v1/posts${params.toString() ? `?${params.toString()}` : ''}`;
15
16
fetch(url, { credentials: 'include' })
17
.then((res) => res.json())
18
.then((data) => {
19
setPosts(data.data || data);
20
setLoading(false);
21
})
22
.catch((err) => {
23
console.error('Filter request failed', err);
24
setLoading(false);
25
});
26
}, [userId]);
27
28
return { posts, loading };
29
}
Next Query Feature

Full-Text Search Engine

Related Query Feature

Dynamic Multi-Type Sorting