Back to top

Push vs. Pull - Decoupling Drupal with GraphQL & Twig

To achieve "loose coupling" has been a desirable goal in software engineering long before javascript frameworks hit the ground running a couple of years ago. Not every project has the budget or need to employ a fully decoupled Javascript (Node) + PHP stack, but this doesn't mean that it can't benefit from the lessons we've learned.

The same patterns for separating concerns and organising information requirements can be applied to Twig-based frontends as well and bring the potential to vastly improve the development workflow of a Drupal website.

You will learn how to use the GraphQL Twig module to implement the same principles for building component based user interfaces we know from Angular, Vue or React, but in a Drupal-only environment. The session requires basic knowledge about the concepts behind decoupled Drupal.

The session will cover:

  • (Very) brief introduction to GraphQL in Drupal
  • The benefits of "Pull" instead of "Push"
  • Basic setup and example of GraphQL in Twig
  • Argument handling and automatic query assembly
  • The synergy with component based development (Patternlab, Fractal)
Room Theater (B104)
Session type