Add apollo-client to a React project

Loading

Reading Time: < 1 minute Set up Apollo Client for React npm install apollo/client and graphql Create client.tsx file to store configuration of apollo-client react import ApolloClient, InMemoryCache and HttpLink from ‘@apollo/client’ Initialize and export an instance of ApolloClient Test client instance in client.tsx by executing a GraphQL query Create a new folder named graphql and add get-languages.tsx in it … Read more