In this first live video training session, we'll look into the Drupal module "GraphQL Twig" from the modules' developer Philipp Melab.
The current push model used by Drupal scatters responsibilities across modules, preprocess functions, and templates. If we would turn this around and let the template define its' data requirements (as it happens in decoupled projects naturally), we could achieve a much clearer data flow and increase readability and maintainability significantly.
This is what the GraphQL Twig module is supposed to do. It allows us to add GraphQL queries to any Twig template, which will be picked up during rendering and used to populate the template with data.
Let's take a deep dive together on getting setup with this module with some real life examples.