getOwnedObjects method
Future<Page<ObjectData> >
getOwnedObjects(
- String address, {
- String? type,
- String? cursor,
- int? limit,
- ObjectIncludeOptions? include,
override
Objects owned by address, optionally filtered by move type.
Implementation
@override
Future<Page<ObjectData>> getOwnedObjects(
String address, {
String? type,
String? cursor,
int? limit,
ObjectIncludeOptions? include,
}) async {
final data = await _client.executeData(
_getOwnedObjectsOperation,
generated.Variables$Query$GetOwnedObjects(
address: address,
type: type,
first: limit,
after: cursor,
),
);
final connection = data.address?.objects;
if (connection == null) return const Page(data: [], hasNextPage: false);
return Page(
data: connection.nodes.map(_mapOwnedObject).toList(),
hasNextPage: connection.pageInfo.hasNextPage,
nextCursor: connection.pageInfo.endCursor,
);
}