@@ -4,20 +4,20 @@ import 'package:gsy_github_app_flutter/common/net/graphql/users.dart';
44import 'package:gsy_github_app_flutter/common/utils/common_utils.dart' ;
55
66Future <GraphQLClient > _client (token) async {
7- final HttpLink _httpLink = HttpLink (
7+ final HttpLink httpLink = HttpLink (
88 'https://api.github.com/graphql' ,
99 );
1010
11- final AuthLink _authLink = AuthLink (
11+ final AuthLink authLink = AuthLink (
1212 getToken: () => '$token ' ,
1313 );
1414
15- final Link _link = _authLink .concat (_httpLink );
15+ final Link link = authLink .concat (httpLink );
1616 var path = await CommonUtils .getApplicationDocumentsPath ();
1717 final store = await HiveStore .open (path: path);
1818 return GraphQLClient (
1919 cache: GraphQLCache (store: store),
20- link: _link ,
20+ link: link ,
2121 );
2222}
2323
@@ -32,14 +32,14 @@ releaseClient() {
3232}
3333
3434Future <QueryResult >? getRepository (String owner, String ? name) async {
35- final QueryOptions _options = QueryOptions (
35+ final QueryOptions options = QueryOptions (
3636 document: gql (readRepository),
3737 variables: < String , dynamic > {
3838 'owner' : owner,
3939 'name' : name,
4040 },
4141 fetchPolicy: FetchPolicy .noCache);
42- return await _innerClient! .query (_options );
42+ return await _innerClient! .query (options );
4343}
4444
4545Future <QueryResult >? getTrendUser (String location, {String ? cursor}) async {
@@ -51,9 +51,9 @@ Future<QueryResult>? getTrendUser(String location, {String? cursor}) async {
5151 'location' : "location:$location sort:followers" ,
5252 'after' : cursor,
5353 };
54- final QueryOptions _options = QueryOptions (
54+ final QueryOptions options = QueryOptions (
5555 document: gql (cursor == null ? readTrendUser : readTrendUserByCursor),
5656 variables: variables,
5757 fetchPolicy: FetchPolicy .noCache);
58- return await _innerClient! .query (_options );
58+ return await _innerClient! .query (options );
5959}
0 commit comments