Skip to content

Commit

Permalink
Remove deprecated cacheRedirects synonyms.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn authored and Stephen Barlow committed Oct 1, 2019
1 parent 2fdee66 commit 1a58ebb
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions packages/apollo-cache-inmemory/src/inMemoryCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
import './fixPolyfills';

import { DocumentNode } from 'graphql';

import { Cache, ApolloCache, Transaction } from 'apollo-cache';

import { addTypenameToDocument, canUseWeakMap } from 'apollo-utilities';

import { wrap } from 'optimism';

import { invariant, InvariantError } from 'ts-invariant';
import { InvariantError } from 'ts-invariant';

import {
ApolloReducerConfig,
Expand Down Expand Up @@ -102,22 +98,6 @@ export class InMemoryCache extends ApolloCache<NormalizedCacheObject> {
constructor(config: InMemoryCacheConfig = {}) {
super();
this.config = { ...defaultConfig, ...config };

// backwards compat
if ((this.config as any).customResolvers) {
invariant.warn(
'customResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating customResolvers in the next major version.',
);
this.config.cacheRedirects = (this.config as any).customResolvers;
}

if ((this.config as any).cacheResolvers) {
invariant.warn(
'cacheResolvers have been renamed to cacheRedirects. Please update your config as we will be deprecating cacheResolvers in the next major version.',
);
this.config.cacheRedirects = (this.config as any).cacheResolvers;
}

this.addTypename = !!this.config.addTypename;

if (this.config.possibleTypes) {
Expand Down

0 comments on commit 1a58ebb

Please sign in to comment.