Fetching single item from cache when cache is filled with array #1075
Unanswered
RubenVanEldik
asked this question in
Q&A
Replies: 1 comment
-
I got the same issue. While query an array result, I just got the array fill with the first record data, but it is normal when use igraphql. ////////////////////////////// |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry to create an issue in the main repository, but I couldn't find anything online and didn't receive an answer on the nuxt-apollo discord server.
Is it possible to fetch a singular item from the Apollo cache after I've fetched multiple items on another page?
I have already fetched
stories
on another page, but now I want to fetch a singular itemstory(id: $id)
from the cache. So this is afetchPolicy: 'cache-only'
query. I have tried a few things, but it looks like Apollo does not know thatstories
is the plural ofstory
(which makes sense). Is there anything I can add to let Apollo know that if I ask for a story it can also return the stories item with the same ID?Would this for example work with something like the IntrospectionFragmentMatcher?
This is quite essential to a project I am working on. If anybody could point me in the right direction I would be eternally grateful!
Beta Was this translation helpful? Give feedback.
All reactions