mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 20:49:02 +00:00
Fix Apollo cache for timeline view
This commit is contained in:
@@ -5,10 +5,7 @@ import {
|
||||
ApolloLink,
|
||||
HttpLink,
|
||||
} from '@apollo/client'
|
||||
import {
|
||||
getMainDefinition,
|
||||
offsetLimitPagination,
|
||||
} from '@apollo/client/utilities'
|
||||
import { getMainDefinition } from '@apollo/client/utilities'
|
||||
import { onError } from '@apollo/client/link/error'
|
||||
import { WebSocketLink } from '@apollo/client/link/ws'
|
||||
|
||||
@@ -129,7 +126,12 @@ const memoryCache = new InMemoryCache({
|
||||
},
|
||||
Query: {
|
||||
fields: {
|
||||
myTimeline: offsetLimitPagination(['onlyFavorites']),
|
||||
myTimeline: {
|
||||
keyArgs: ['onlyFavorites'],
|
||||
merge(existing = [], incoming) {
|
||||
return [...existing, ...incoming]
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user