withoutCache method

Context withoutCache()

Disables caching for this request.

Equivalent to withCachePolicy(CachePolicy.networkOnly).

Example:

// Always fetch fresh data
final response = await client.execute(
  query,
  context: Context().withoutCache(),
);

Implementation

Context withoutCache() {
  return withCachePolicy(CachePolicy.networkOnly);
}