I am using Apollo client on the server in page components using next 14 app router and want to be able to control what data is cached and what isnt. For some lookup data I want it to permanently cache, but for transactional data I want it to never cache. However I am finding that every query is caching and only a hard page refresh forces a fresh request to the back end service I am calling.
A simple example
const response = await client.query({ query: SOME_GRAPHQL_QUERY, variables: {id: someid}, fetchPolicy: "no-cache" })
I am then passing the data from the response to client component for rendering.
<ClientComponent
data={response.data.resposneObject.map(x => ({ ...x }))}
/>
And the network is only ever hit on the first request. Even on page refresh, the page is rendered without a subsequent network request.
I feel there is something fundamental I am missing with SSR and Apollo.