import React, { ReactNode } from "react"; import { ApolloClient, InMemoryCache, ApolloProvider, HttpLink, from, } from "@apollo/client"; import { API_URI } from "@env"; type Props = { children: ReactNode; }; const ClientProvider: React.FC = ({ children }) => { const httpLink = new HttpLink({ uri: API_URI, }); const cache = new InMemoryCache({}); const client = new ApolloClient({ link: from([httpLink]), cache: cache, }); return {children}; }; export default ClientProvider;