engagements query provides a powerful way to list and search through all of your
engagements. It supports filtering, text search, sorting, and cursor-based pagination.
Basic paginated list
To retrieve a simple paginated list of engagements, use thefirst argument to specify
how many results you want:
Filtering
Use thefilters argument with an EngagementSearchFilterInput to narrow down results.
All filter fields are optional and can be combined:
By status
By type
By province
By date range
BothclosingDate and createdAt support date range filtering:
Combining filters
All filter fields can be used together. When multiple filters are specified, results must match all of them:Text search
Use thequery parameter to perform a text search across engagements. This is useful
for finding engagements by client name, short ID, or other searchable fields:
The
query and filters parameters can be combined to perform a text search
within a filtered set of results.Sorting
Control the order of results with thesortOrder argument using the
EngagementSearchSortOrder enum:
Pagination
Theengagements query uses cursor-based pagination. Use pageInfo to determine if
there are more results, and pass the endCursor value as the after argument to
fetch the next page:
1
Fetch the first page
Call
engagements(first: 20) without an after cursor.2
Check for more results
If
pageInfo.hasNextPage is true, there are more results to fetch.3
Fetch subsequent pages
Pass
pageInfo.endCursor as the after argument in the next request.
Repeat until hasNextPage is false.For more details on cursor-based pagination patterns, see the
Pagination documentation.
Next steps
Fetching engagement details
Retrieve detailed information about a specific engagement.
Cancelling an engagement
Learn how to cancel an engagement that is no longer needed.