

Here Comes Quell: the Better Caching Solution for GraphQL
source link: https://roblehfarah.medium.com/here-comes-quell-the-better-caching-solution-for-graphql-41745a286a24
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Here Comes Quell: the Better Caching Solution for GraphQL
Developers, be advised. An increasing number of companies are transitioning away from traditional REST APIs in favor of GraphQL in order to benefit from the flexibility, simplicity of use, and precision of data transfer it provides. GraphQL allows developers to overcome the over and under fetching shortcomings of REST APIs by enabling data collection from multiple sources in a single API call.
However, GraphQL queries operate on the same HTTP endpoint, instead of a URL that can act as a globally unique identifier, as is the case with REST APIs. Therefore, they require the development of new methods and standards for caching.
That’s where Quell comes in.
Now supporting more GraphQL features than ever before.What is Quell?
Quell is an easy-to-use, lightweight JavaScript library, enabling efficient caching for applications leveraging GraphQL. Quell’s schema-governed, type-level normalization algorithm caches GraphQL query responses as flattened key-value representations of the graph’s nodes, making it possible to partially satisfy queries from a cached data store, reformulate the query, and fetch from other APIs or databases only the data not already cached. This strategy increases cache hits, reduces network calls, and significantly reduces the overall runtime.
Quell can be installed for both client (Quell/Client) and server-side (Quell/Server) usage as separate, open-source NPM packages. Quell/Client harnesses the browser’s sessionStorage as its cached data store. Quell/Server utilizes the server’s Redis cache.
This latest update to the Quell product expands upon the flexible, time-saving capabilities of Quell to support more core GraphQL features,caching requests with aliases, fragments, multiple queries, or nested queries.

Quell Caches Even More Requests
Quell/Client and Quell/Server now supports a broader range of GraphQL features for caching: including aliases, fragments, multiple queries, and nested queries. Steps for installation and implementation of the updated Quell product can be found here for client-side, and here server-side.
Quell/Client functions as a wrapper over the fetch web API; unlike tools such as Apollo or Relay, Quell/Client can integrate with any front-end framework that supports fetch without causing incompatible state management patterns. As a Node.js/Express middleware, Quell/Server easily integrates into pre-existing Express server architecture without significant refactoring.
Developers can entrust Quell to handle their GraphQL caching needs simply and effectively, so they can focus on working with their existing tool(s).
Aliases

Fragments

Multiple Queries

Nested Queries

Recommend
-
49
A recent Google study concluded that increased page response times of 400 ms results in a 0.44% decrease in traffic. A 400 ms lag on a Google page therefore leads to 440 million abandoned sessions a mont...
-
51
README.md Apollo iOS
-
11
Introducing Quell: A Better Caching Solution for GraphQLCaching just got easier
-
6
Apollo Client Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, and more. It allows you to easily build UI components that fetch data via GraphQL. Documentation All Apollo...
-
11
Implementing caching for pipeline resolvers in AWS AppSync GraphQL APIs by Ed Lima | on 31 AUG 2021 | in *Post Types,
-
6
Technology|Facebook Struggles to Quell Uproar Over Instagram’s Effect on TeensCredit...Eric Thayer for The New York TimesFace...
-
8
U.S. Fed implements 0.75 point interest rate in attempt to quell rampant inflation; warns rates will peak at higher level than expected Wednesday, November 2, 2022 6:42 pm
-
3
Support is great. Feedback is even better."Qeraunos is an open source product and we are constantly looking to improve our code, so if you have any ideas and want to contribute, feel free to send us a pull request on GitHub! Check ou...
-
7
QuellThe lightweight caching solution for GraphQL queriesQuell is a Javascript library that caches GraphQL queries. Quell 8.0 contains major improvements to Quell’s caching algori...
-
8
TechMicrosoft partners with labor groups to quell concerns about AI taking jobs...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK