fix(blank pages): removing apollo caching (#3008)

This commit is contained in:
Gabe Lyons 2021-08-02 17:49:57 -07:00 committed by GitHub
parent 93069e5cec
commit f4a6d18c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,62 +48,11 @@ const errorLink = onError(({ networkError }) => {
const client = new ApolloClient({
connectToDevTools: true,
link: errorLink.concat(httpLink),
cache: new InMemoryCache({
typePolicies: {
Query: {
fields: {
dataset: {
merge(existing, incoming) {
return { ...existing, ...incoming };
},
},
},
},
Dataset: {
keyFields: ['urn'],
},
CorpUser: {
keyFields: ['urn'],
},
Dashboard: {
keyFields: ['urn'],
},
Chart: {
keyFields: ['urn'],
},
DataFlow: {
keyFields: ['urn'],
},
DataJob: {
keyFields: ['urn'],
},
MLFeatureTable: {
keyFields: ['urn'],
},
MLModel: {
keyFields: ['urn'],
},
MLModelGroup: {
keyFields: ['urn'],
},
},
possibleTypes: {
EntityWithRelationships: [
'Dataset',
'Chart',
'Dashboard',
'DataJob',
'MLFeature',
'MLPrimaryKey',
'MLModel',
'MLModelGroup',
],
},
}),
cache: new InMemoryCache(),
credentials: 'include',
defaultOptions: {
watchQuery: {
fetchPolicy: 'cache-and-network',
fetchPolicy: 'no-cache',
nextFetchPolicy: 'cache-first',
},
query: {