Hi, I’m trying do infinite Scroll and I struggle with merge results of fetchMore function.
I use useQuery, but in typePolicies I can not merge the next page result, I’m doing same like in docs,but nothing happens.
When I’ve used relayStylePagination func, useQuery doesnt, get result on the begining, when component load with search varr then useQuery returned response and fetchMore worked, but when search word is incoming dynamicly response is empty.
Is anyone has same problem ??
My typePolicies look like:
const client = new ApolloClient({
link: authLink.concat(
new HttpLink({ uri: "https://api.github.com/graphql" })
),
cache: new InMemoryCache({
typePolicies: {
Query: {
fields: {
search: {
merge(existing = {}, incoming) {
return { ...existing, ...incoming };
},
},
},
},
},
}),
});