Skip to content

Commit

Permalink
Slight tweak to merge function typing in fetchMore tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Jul 27, 2020
1 parent b726d36 commit 716fa9d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/__tests__/fetchMore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assign, cloneDeep } from 'lodash';
import gql from 'graphql-tag';

import { itAsync, mockSingleLink, subscribeAndCount } from '../testing';
import { InMemoryCache, InMemoryCacheConfig } from '../cache';
import { InMemoryCache, InMemoryCacheConfig, FieldMergeFunction } from '../cache';
import { ApolloClient, NetworkStatus, ObservableQuery } from '../core';
import { offsetLimitPagination, concatPagination } from '../utilities';

Expand Down Expand Up @@ -412,7 +412,8 @@ describe('fetchMore on an observable query', () => {
const { merge } = groceriesFieldPolicy;
groceriesFieldPolicy.merge = function (existing, incoming, options) {
mergeArgsHistory.push(options.args);
return (merge as any).call(this, existing, incoming, options);
return (merge as FieldMergeFunction<any>).call(
this, existing, incoming, options);
};

const cache = new InMemoryCache({
Expand Down

0 comments on commit 716fa9d

Please sign in to comment.