Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix circular makeDict dependency in Graphcache

+11 -8
+1 -1
exchanges/graphcache/src/ast/variables.ts
··· 5 5 } from 'graphql'; 6 6 7 7 import { getName } from './node'; 8 - import { makeDict } from '../store'; 8 + import { makeDict } from '../helpers/dict'; 9 9 import { Variables } from '../types'; 10 10 11 11 /** Evaluates a fields arguments taking vars into account */
+2 -1
exchanges/graphcache/src/cacheExchange.ts
··· 28 28 29 29 import { query, write, writeOptimistic } from './operations'; 30 30 import { hydrateData } from './store/data'; 31 - import { makeDict, Store, clearOptimistic } from './store'; 31 + import { makeDict } from './helpers/dict'; 32 + import { Store, clearOptimistic } from './store'; 32 33 33 34 import { 34 35 UpdatesConfig,
+1
exchanges/graphcache/src/helpers/dict.ts
··· 1 + export const makeDict = (): any => Object.create(null);
+2 -1
exchanges/graphcache/src/operations/query.ts
··· 27 27 getCurrentDependencies, 28 28 initDataState, 29 29 clearDataState, 30 - makeDict, 31 30 joinKeys, 32 31 keyOfField, 33 32 } from '../store'; 34 33 35 34 import * as InMemoryData from '../store/data'; 35 + import { makeDict } from '../helpers/dict'; 36 36 import { warn, pushDebugNode } from '../helpers/help'; 37 37 import { SelectionIterator, ensureData } from './shared'; 38 + 38 39 import { 39 40 isFieldAvailableOnType, 40 41 isFieldNullable,
+1 -1
exchanges/graphcache/src/operations/write.ts
··· 27 27 getCurrentDependencies, 28 28 initDataState, 29 29 clearDataState, 30 - makeDict, 31 30 joinKeys, 32 31 keyOfField, 33 32 } from '../store'; 34 33 35 34 import * as InMemoryData from '../store/data'; 35 + import { makeDict } from '../helpers/dict'; 36 36 import { invariant, warn, pushDebugNode } from '../helpers/help'; 37 37 import { SelectionIterator, ensureData } from './shared'; 38 38
+1 -1
exchanges/graphcache/src/populateExchange.ts
··· 19 19 import { Exchange, Operation } from '@urql/core'; 20 20 21 21 import { getName, getSelectionSet, unwrapType } from './ast'; 22 - import { makeDict } from './store'; 22 + import { makeDict } from './helpers/dict'; 23 23 import { invariant, warn } from './helpers/help'; 24 24 25 25 interface PopulateExchangeOpts {
+2 -2
exchanges/graphcache/src/store/data.ts
··· 5 5 StorageAdapter, 6 6 SerializedEntries, 7 7 } from '../types'; 8 + 9 + import { makeDict } from '../helpers/dict'; 8 10 import { invariant, currentDebugStack } from '../helpers/help'; 9 11 import { fieldInfoOfKey, joinKeys, prefixKey } from './keys'; 10 12 import { defer } from './timing'; ··· 31 33 links: NodeMap<Link>; 32 34 storage: StorageAdapter | null; 33 35 } 34 - 35 - export const makeDict = (): any => Object.create(null); 36 36 37 37 let currentData: null | InMemoryData = null; 38 38 let currentDependencies: null | Set<string> = null;
-1
exchanges/graphcache/src/store/index.ts
··· 1 1 export { 2 - makeDict, 3 2 initDataState, 4 3 clearDataState, 5 4 clearOptimistic,
+1
scripts/eslint/preset.js
··· 26 26 ], 27 27 plugins: ['react-hooks'], 28 28 rules: { 29 + '@typescript-eslint/no-use-before-define': 'off', 29 30 '@typescript-eslint/ban-ts-ignore': 'off', 30 31 '@typescript-eslint/member-ordering': 'off', 31 32 '@typescript-eslint/explicit-member-accessibility': 'off',