Skip to content

Commit 594c5de

Browse files
committed
refactor: fetch policy network only
1 parent 7247c05 commit 594c5de

File tree

2 files changed

+4
-35
lines changed

2 files changed

+4
-35
lines changed

lib/models/auth.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'dart:convert';
22
import 'dart:async';
33
import 'package:ferry/ferry.dart';
4-
import 'package:git_touch/utils/nil_store.dart';
54
// import 'package:in_app_review/in_app_review.dart';
65
import 'package:universal_io/io.dart';
76
import 'package:git_touch/models/bitbucket.dart';
@@ -703,7 +702,10 @@ class AuthModel with ChangeNotifier {
703702
_apiPrefix + '/graphql',
704703
defaultHeaders: {HttpHeaders.authorizationHeader: 'token $token'},
705704
),
706-
cache: Cache(store: NilStore()),
705+
// https://ferrygraphql.com/docs/fetch-policies#default-fetchpolicies
706+
defaultFetchPolicies: {
707+
OperationType.query: FetchPolicy.NetworkOnly,
708+
},
707709
);
708710
}
709711

lib/utils/nil_store.dart

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)