Diamond sponsors

Decoupling Drupal with GraphQL & Twig

Profile picture for user pmelab
Lead engineer
Amazee Labs
Experience level
45 minutes
0.04 dynamicum
Starts at
Ends at
Industry track
Expertise topics

If we want decoupled Drupal, we need to decouple Drupal first. Reap the benefits of a cleanly separated workflow without worrying about the risks.


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 requirement 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 traditional Twig theming 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:

  • A (Very) brief introduction to GraphQL in Drupal
  • The benefits of "Pull" instead of "Push"
  • Basic setup and an¬†example of GraphQL in Twig
  • Argument handling and automatic query assembly
  • The synergy with component-based development (Patternlab, Fractal)

Platinum sponsors