make getting more freebies work
This commit is contained in:
parent
f6c5644311
commit
5ca67c3411
|
@ -78,6 +78,19 @@ export default function getApolloClient () {
|
|||
}
|
||||
}
|
||||
},
|
||||
freebieItems: {
|
||||
keyArgs: [],
|
||||
merge (existing, incoming) {
|
||||
if (isFirstPage(incoming.cursor, existing?.items)) {
|
||||
return incoming
|
||||
}
|
||||
|
||||
return {
|
||||
cursor: incoming.cursor,
|
||||
items: [...(existing?.items || []), ...incoming.items]
|
||||
}
|
||||
}
|
||||
},
|
||||
search: {
|
||||
keyArgs: ['q'],
|
||||
merge (existing, incoming) {
|
||||
|
|
Loading…
Reference in New Issue