history method
Implementation
Future<Map<String, dynamic>?> history(String pubkey,
[int? pageSize, String? cursor]) async {
final QueryOptions options = QueryOptions(
document: gql(getHistoryQuery),
variables: <String, dynamic>{
'pubkey': pubkey,
'number': pageSize ?? 100,
'cursor': cursor,
},
);
final QueryResult result = await _client.query(options);
if (result.hasException) {
printIfDebug(result.exception.toString());
throw Exception('Unexpected error happened in graphql request');
} else if (result.data != null) {
return result.data;
}
return null;
}