queryIndexer method
Future
queryIndexer(
{ - required dynamic document,
- Map<String, dynamic> variables = const {},
})
Implementation
Future queryIndexer({
required dynamic document,
Map<String, dynamic> variables = const {}
}) async {
if (document is String) {
document = gql(document);
}
final options = QueryOptions(document: document, variables: variables);
final resp = await client.query(options);
if(resp.hasException) {
throw ArgumentError("Indexer data error ${resp.exception}");
}
return resp.data;
}