The first line of code imports the Apollo Client library. The next three lines create a new instance of the Apollo Client object. The last line provides the required constructor fields for the Apollo Client.
import { ApolloClient, InMemoryCache } from '@apollo/client';
import { ApolloClient, InMemoryCache } from '@apollo/client';
import { ApolloClient, InMemoryCache } from '@apollo/client';
const client = new ApolloClient({
// Provide required constructor fields
cache: new InMemoryCache(),
uri: 'https//url/to/graphql/endpoint',
});