Tag: Caching
-
How to implement caching for pagination HOT chocolate?
2 so I want to implement caching. I’m using version 11 hc. Now every time pagination happens there’s requests sent to the database. I want to implement it so the first time a request is made, all the data is retrieved and cached and subsequent requests(going to the next page or previous page) are retrieved…
-
GraphQL Schema Caching or Optimization Ideas
0 GraphQLSchema object will be used to process graphQL request. This object can be generated once and could be reused multiple times until any meta changes occurs. But my question is how can I cache this object directly in my JVM, since its size is huge (around 17MB 😳). According to my application, I need…
-
Apollo GraphQL: dynamically caching a schema type, not the entire resolver
0 I would like to use dynamic cache. I was able to set the cache maxAge into the query resolver, but since the resolver can return both an unsuccessful and a successful response I would like to only cache the successful one. In order to do this I would like to set up the info…
-
Any way to only cache GOOD responses in data sources?
0 Is there any way in @apollo/datasource-rest to cache "good" responses from my rest api, i.e statuses 200 to 299. I read in the datasource-rest documentation (https://github.com/apollographql/datasource-rest/blob/main/src/HTTPCache.ts#L201) that "With a TTL override, only cache successful responses but otherwise ignore method and response headers" Does that mean that adding this to my dataSource: cacheOptions: { ttl:…
-
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 } }…