Reputation: 257
Problem is that I need to fetch data from the server, but it returns local cache data. So it has a different value from the server.
final HttpLink httpLink = HttpLink("URL");
final AuthLink authLink = AuthLink(
getToken: () => "Token", headerKey: "auth"
);
final Link link = authLink.concat(httpLink);
GraphQLClient client = GraphQLClient(
cache: GraphQLCache(store: HiveStore()),
link: link,
);
ValueNotifier<GraphQLClient> notifierClient = ValueNotifier(client);
Upvotes: 0
Views: 307
Reputation: 980
You can define GraphQLClient
without store
.
GraphQLClient client = GraphQLClient(
cache: GraphQLCache(),
link: link,
);
Upvotes: 1