DEV Community

Discussion on: Building a Full Stack App with React, TypeScript, and GraphQL

Collapse
 
floroz profile image
Daniele Tortora

I would consume the GraphQL API on the front end using react-apollo/hooks.

The pattern shown in this example use the render prop pattern, which was previously used by Apollo (and previous Context API) and leads to the 'component callback hell' which affects readability.

I think the apollo hooks approach (that leverages the new Context API) is much cleaner and more readable :)