Apollo Client and Qwik

So I’m not sure if anyone has seen/played with Qwik but it’s a new framework being actively developed that features resumability and heavy lazy loading. State is serialised within the DOM itself and the big selling point is that no JS is delivered (or needed) for the initial load and stuff starts loading in as you interact with it and resume a component: https://qwik.builder.io/

So far I don’t see any speak about how ApolloClient is going to fit into it. I’m wondering anyone has played with it, has any idea how that’s going to work (is it needed at all?).

Since the state/data is serialised directly into the DOM, I’m thinking there’s no need for a massive InMemoryCache state store holding things anymore.

When searching for Qwik and GraphQL this is the only library I can find relating to the two: GitHub - TahaSh/qwikql: A GraphQL client for Qwik framework.

Hi @intellix :wave: this is a great question. I apologize in advance for being vague since I haven’t used Qwik. We are very interested in how Apollo Client might adapt to new tools like Qwik. Client-side state management is a major feature of the client so abstractions like Qwik and React Server components present an opportunity. To speak to your observation about InMemoryCache, it’s possible to use the client with a different cache implementation. InMemoryCache extends the abstract ApolloCache class. Here’s an example of an alternative ApolloCache subclass that is optimized for React Native:

So someone familiar with Qwik’s state management paradigm could probably make some progress here if they were so inclined!