DataSource Initialization in AS4

Hi @sailesh, In Apollo Server v4 we no longer create Datasources on a per-request. See our migration guide to learn more, but the short answer is that we leave it up to you to decide what is going into the context per-request and you could provide singleton references if you wanted. If you did want to replicate the behavior of ASv3 you could, but it is not required.

David answered this in the linked question about why there is two different caches: Why do we need a *per request* based data source instance? - #3 by glasser

The cache in expressMiddleware function is the top level shared HTTP cache