Tag: Caching
-
Flutter graphql using cache with hive, when calling query with police ‘cacheAndNetwork’ it always uses the network without the cache
2 Flutter graphql using cache with hive, when calling query with police ‘cacheAndNetwork’ it always uses the network without the cache Here is caple of my code Future<QueryResult> query(String query, {Map<String, dynamic> variables}) async { QueryOptions options = QueryOptions( document: gql(query), variables: variables, fetchPolicy: FetchPolicy.cacheAndNetwork, errorPolicy: ErrorPolicy.none, cacheRereadPolicy: CacheRereadPolicy.mergeOptimistic, ); final result = await _client.query(options); […]
-
Graphql cache: Specify a merge function to a query which is nested under a common type
0 Lets say graphql scema looks like this type query { foodInformation: Foodinformation # some other query types carInformation: CarInformation } type Foodinformation { getDishes(): Dishes! getFilteredDishes(input: filterInput): Dishes! # some other quiries } type PageInformation { pageNumber: int pageSize: int totalPages: int totalItems: int } input FilterInput { name: string id: int comment: string […]
-
Error encountered while automatically updating the cache when creating a CompanyQuote component
0 I’m working on a project where I’ve created a backend script to handle GraphQL requests. I have a file called company.graphql that contains a query to retrieve information about a company and its related quotes. Here’s a snippet of the script query Companie($id: String!) { companie(id: $id) { attachmentId companieQuotes { attachmentId } } […]