Tags: apollo client cache react
Hi! I have 2 different queries. The first query is fetching some static information about an asset/item. The second query is a personalised query that fetches an additional field (resumePosition
) of this previously fetched asset. Apollo Client Cache does make the connection as far as I can see in the Apollo development tool, however I do not see this field in the data of the asset. It seems like the Cache has the reference to the ResumePosition Object but the data is not received.
Do I have to update the data using writeFragment
? My assumption here is that Apollo would update it already based on the additional reference of the data.
Static Asset Query
query Block {
...Asset
}
fragment Asset on Asset {
id
title
}
Personalised Resume Position Query
query ResumePosition {
... on Asset {
id
resumePosition {
position
}
}
}
Asset