...
/GraphQL Query/Mutation with Higher-Order Components in React
GraphQL Query/Mutation with Higher-Order Components in React
Let's learn GraphQL mutations using Higher-Order Components with Apollo Client in React!
We'll cover the following...
We’ve done Query
and Mutation
components from React Apollo to connect a data-layer (Apollo Client) with a view-layer (React).
The Query
component executes the query when it is rendered, whereas the Mutation
component gives access to a function that triggers the mutation. Both components use the render props pattern to make the results accessible in their child functions.