Deepak Pai's Blog

HomeBadges

Understanding how Apollo Cache normalizes data

Dec 6, 20208 min read

Apollo uses a cache layer for its queries. By default, before executing a query, first the cache is accessed and if its not present in the cache then it makes a network call. This is called the cache-first fetch policy. You can find other fetch polic...

Aliasing Preact correctly for Server Side Rendering

Nov 8, 20204 min read

React has become the most modern front end library. However there is a pretty big disadvantage of using it. react and react-dom library together make up 38.6kB minified and gzipped (version 16.13.1). This is quite a significant cost to pay on mobile ...

Defining type policies during runtime in Apollo

Oct 26, 20206 min read

Apollo InMemoryCache type policies are used to define field policies for local state, to customize identifier generation by type or to define a custom merge function for the cache. The standard way of doing this is by defining the type policies durin...

Dead Code Elimination in Javascript

Oct 17, 20205 min read

Dead code elimination is a process wherein code that is not used is excluded from the code that is executed. In many compile time languages this is a much easier process since a compiler can easily determine the code that is used. However in javascri...

© 2021 Deepak Pai's Blog

PrivacyTerms
Proudly part of