Apollo Client GraphQL with Reactjs
Integrating GraphQL APIs in reactjs was a little tricky with GraphQL rely upon, Now Apollo Client made GraphQL Integration and Usage very easy even though we can call the GraphQL API a Restful call.
But managing the data needs to Integrate third-party libraries like Redux or MobX. Now with Apollo Client, it handles API calling along with State Management.
Now we will go through the Integration part in Reactjs.
Step 1
Create a project locally with a create react app.
Lets Install the dependency package for apollo client
npm install @apollo/client graphql
apollo/client: package help to setup the apollo client in the project and has InMemoryCache, state management, error handling.
Graphql: Helps to parse the GraphQL queries.
Read more: https://tudip.com/blog-post/apollo-client-graphql-with-reactjs/