Using GraphQL with Drupal and React

Session Track
Frontend & Web Design
Skill level
Intermediate

Decoupled Drupal is the popular option these days thanks to different frontend framework options available today. Decoupled Drupal means using Drupal for the backend content and a different javascript framework or library on the frontend like Angular, React JS or Vue JS.

Drupal 8 provides the REST API out of the box which is suitable for building decoupled applications. But it is not straightforward to start using it in the projects. It would need several queries to get the required data but along with it comes the unnecessary data too, thus leading to confusion and complexity.

GraphQL is a query language for APIs and a runtime for fulfilling those queries with existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more.

This session covers:

  1. How to configure and use GraphQL contributed module with Drupal 8.
  2. How to use GraphQL queries in React to fetch data from Drupal 8.

Prerequisites

  1. Basic knowledge of Drupal 8.
  2. Basic knowledge of React.