apollo cache merge function
This commit is contained in:
parent
f12199da65
commit
effa4a6616
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user