apollo cache merge function

This commit is contained in:
Djeeberjr 2021-09-09 13:56:23 +02:00
parent f12199da65
commit effa4a6616

View File

@ -7,7 +7,24 @@ import "react-contexify/dist/ReactContexify.css"
const client = new ApolloClient({
uri: "/api/graphql",
cache: new InMemoryCache()
cache: new InMemoryCache({
typePolicies:{
Query: {
fields: {
files: {
merge(existing, incoming){
return incoming
}
},
directorys:{
merge(existing, incoming){
return incoming
}
}
}
}
}
})
})
// Disable drag and drop behaviour on document