<commit_before>/* necessary for backward compat */
export * from 'apollo-client';
export * from 'apollo-link';
export * from 'apollo-cache-inmemory';

import { Operation, ApolloLink, Observable } from 'apollo-link';
import { HttpLink } from 'apollo-link-http';
import { withClientState, ClientStateConfig } from 'apollo-link-state';
import { onError, ErrorLink } from 'apollo-link-error';

import {
  InMemoryCache,
  NormalizedCache,
  NormalizedCacheObject,
} from 'apollo-cache-inmemory';
import { ApolloCache } from 'apollo-cache';

import gql from 'graphql-tag';
import ApolloClient, { ApolloClientOptions } from 'apollo-client';

export { gql, InMemoryCache, HttpLink };

export interface PresetConfig {
  request?: (operation: Operation) => Promise<void>;
  uri?: string;
  fetchOptions?: HttpLink.Options;
  clientState?: ClientStateConfig;
  onError?: ErrorLink.ErrorHandler;
}

export default class DefaultClient<
  TCache = NormalizedCache
> extends ApolloClient<TCache> {
  constructor(config: PresetConfig) {
    const cache: ApolloCache<NormalizedCacheObject> = new InMemoryCache();

    const stateLink =<commit_msg>Change to cacheRedirects<commit_after>/* necessary for backward compat */
export * from 'apollo-client';
export * from 'apollo-link';
export * from 'apollo-cache-inmemory';

import { Operation, ApolloLink, Observable } from 'apollo-link';
import { HttpLink } from 'apollo-link-http';
import { withClientState, ClientStateConfig } from 'apollo-link-state';
import { onError, ErrorLink } from 'apollo-link-error';

import {
  InMemoryCache,
  NormalizedCache,
  NormalizedCacheObject,
  CacheResolverMap,
} from 'apollo-cache-inmemory';
import { ApolloCache } from 'apollo-cache';

import gql from 'graphql-tag';
import ApolloClient, { ApolloClientOptions } from 'apollo-client';

export { gql, InMemoryCache, HttpLink };

export interface PresetConfig {
  request?: (operation: Operation) => Promise<void>;
  uri?: string;
  fetchOptions?: HttpLink.Options;
  clientState?: ClientStateConfig;
  onError?: ErrorLink.ErrorHandler;
  cacheRedirects?: CacheResolverMap;
}

export default class DefaultClient<
  TCache = NormalizedCache
> extends ApolloClient<TCache> {
  constructor(config: PresetConfig) {
    const cache: ApolloCache<NormalizedCacheObject> = cacheRedirects
      ? new InMemoryCache({ cacheRedirects })
      : new InMemoryCache();

    const stateLink =
{'fraction_non_alphanumeric': 0.11254689453939141, 'fraction_numerical': 0.0, 'mean_word_length': 5.434316353887399, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6804246', 'n_tokens_mistral': 727, 'n_tokens_neox': 700, 'n_words': 187}