File size: 297 Bytes
f5071ca
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import { InMemoryCache } from 'apollo-cache-inmemory';
import { ApolloClient } from 'apollo-client';
import { MockLink } from 'apollo-link-mock';

export const mockApolloClient = (mocks: any) => {
  return new ApolloClient({
    cache: new InMemoryCache(),
    link: new MockLink(mocks),
  });
};