client property
Returns GraphQLClient
with or without token header authorization.
Implementation
Future<GraphQLClient> get client async {
if (_client != null && _currentToken == token) {
return _client!;
}
return guard.protect(() async {
if (_client != null && _currentToken == token) {
return _client!;
} else {
_client = await _newClient();
_currentToken = token;
return _client!;
}
});
}