import { ApolloClient, InMemoryCache } from "@apollo/client/core"; import { createHttpLink } from "./createHttpLink"; let graphQlClient: ApolloClient; export const getGraphQlClient = (): ApolloClient => { if (!graphQlClient) { graphQlClient = new ApolloClient({ cache: new InMemoryCache(), link: createHttpLink(), }); } return graphQlClient; };