Searching and Filtering
Learn how to effectively search and filter data in the Duro API using our powerful filtering system.
Basic Query Structure
All component searches use this base query structure:
Query Parameters
Our GraphQL API supports various filtering options:
Available Filters
Text matching (contains, startsWith, endsWith)
Numeric comparisons (eq, gt, lt, gte, lte)
Date ranges
Enum values
Boolean flags
Sorting Results
Pagination
We use cursor-based pagination for optimal performance:
Filter Operators
The filtering system supports these operators:
eq
: Exact matchin
: Match any value in an arraycontains
: String containsgte/lte
: Greater/Less than or equalisNull
: Check for null valuesnotIn
: Exclude values in array
Common Search Patterns
1. Manufacturer and Status Filter
Find components by manufacturer and status:
2. Date Range and Part Number Filter
Search by CPN and creation date:
3. Category and Name Search
Find components by category and name pattern:
Advanced Filtering
The API supports complex logical combinations using and
and or
operators. Here's an advanced example:
This complex filter demonstrates:
Nested logical operators
Multiple condition groups
Mixed filter types
Exclusion conditions
Best Practices
Start with simple filters and add complexity as needed
Use appropriate operators for better performance
Consider pagination for large result sets
Test complex filters with smaller data sets first
Next Steps
Last updated