Infrahub’s GraphQL API provides powerful filtering capabilities using a double-underscore syntax for attribute-level filters and relationship traversal.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/OpsMill/infrahub/llms.txt
Use this file to discover all available pages before exploring further.
Filter Syntax
Filters use afield__operator__subfield pattern:
Attribute Filters
Value Filters
Filter by exact attribute value:Exact match on the attribute value
Match any value in the provided list (OR operation)
Multiple Values (OR)
Filter for nodes matching any of several values:Null Checks
Filter for null or non-null values:true to match null values, false to match non-null valuesProtected Status
Filter by whether an attribute is protected:Filter by protected status of the attribute
Relationship Filters
Direct Relationship
Filter based on related node attributes:Multiple Relationship Filters
Combine multiple relationship filters:Null Relationships
Filter for nodes with or without relationships:true for nodes without this relationship, false for nodes with itRelationship IDs
Filter by related node IDs:Filter by list of related node IDs
Lineage Filters
Source Filter
Filter by the source of an attribute value:Filter by source node ID for lineage tracking
Owner Filter
Filter by the owner of an attribute:Filter by owner node ID for lineage tracking
Text Search
Partial Match
Enable partial string matching:Enable partial/substring matching for text filters (default: false)
Any Field Search
Search across all text attributes:Search across all text attributes of the node
Display Label Filter
Filter by the computed display label:Filter by display label
Filter for null/non-null display labels
Metadata Filters
Creation Time
Filter by when nodes were created:Filter by exact creation timestamp
Filter for nodes created after this timestamp
Filter for nodes created before this timestamp
Update Time
Filter by when nodes were last updated:Filter by exact update timestamp
Filter for nodes updated after this timestamp
Filter for nodes updated before this timestamp
Creator/Updater
Filter by account that created or updated the node:Filter by creator account UUID
Filter by list of creator account UUIDs
Filter by updater account UUID
Filter by list of updater account UUIDs
Advanced Filters
ID Filters
Filter by node IDs:Filter by list of node IDs
Human-Friendly ID (HFID)
Filter by human-friendly identifiers:Filter by human-friendly identifier components
Kind Filter
Filter by node kind (useful for polymorphic queries):Filter by list of node kind names
Combining Filters
All filters combine with AND logic:Performance Considerations
Index Usage
Some filters perform better than others:- ✅ Fast: Exact value matches, ID lookups, null checks
- ⚠️ Moderate: Relationship traversal, metadata filters
- ⚠️ Slower: Partial text matching,
any__valuesearches
Best Practices
- Start specific: Use ID or exact value filters when possible
- Limit results: Always use
limitparameter for large result sets - Avoid wildcards: Partial matching is slower than exact matches
- Index relationships: Filter on indexed relationship fields first
Example: Production IP Prefixes
See Also
- Queries - Query data from Infrahub
- Pagination - Pagination and ordering
- GraphQL Schema Reference - Complete schema documentation