Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Uncaught TypeError: this is undefined ApolloClient ApolloClient.ts:72

const client = new ApolloClient({ //...

//you forgot to put (new in front of ApolloClent)

//=====================> here is my provide
import ApolloClient from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { createHttpLink } from 'apollo-link-http';

const httpLink = createHttpLink({
  url: 'http://localhost:4000'
});

export const client = new ApolloClient({
  link: httpLink,
  cache: new InMemoryCache()
});
 
PREVIOUS NEXT
Tagged: #Uncaught #undefined #ApolloClient
ADD COMMENT
Topic
Name
9+4 =