operations method
- OperationOrigin origin = OperationOrigin.purse,
- int? first,
- OperationsCursor? after,
- int? last,
- OperationsCursor? before,
Returns Operations filtered by the provided criteria.
Authentication
Mandatory.
Sorting
The returned Operations are sorted by their OperationNum in descending order.
Pagination
It's allowed to specify both first and last counts at the same time,
provided that after and before cursors are equal. In such case the
returned page will include the Operation pointed by the cursor and the
requested count of Operations preceding and following it.
If it's desired to receive the Operation, pointed by the cursor, without
querying in both directions, one can specify first or last count as 0.
If no arguments are provided, then first parameter will be considered as
50.
after and before cursors are only meaningful once other non-pagination
arguments remain the same between queries. Trying to query a page of some
filtered entries with a cursor pointing to a page of totally different
filtered entries is nonsense and will produce an invalid result (usually
returning nothing).
Implementation
Future<Operations$Query$Operations> operations({
OperationOrigin origin = OperationOrigin.purse,
int? first,
OperationsCursor? after,
int? last,
OperationsCursor? before,
}) async {
Log.debug('operations($first, $after, $last, $before)', '$runtimeType');
final variables = OperationsArguments(
origin: origin,
pagination: OperationsPagination(
first: first,
after: after,
last: last,
before: before,
),
);
final QueryResult result = await client.query(
QueryOptions(
operationName: 'Operations',
document: OperationsQuery(variables: variables).document,
variables: variables.toJson(),
),
);
return Operations$Query.fromJson(result.data!).operations;
}