Skip to main content
Start of main content.

Building an API with GraphQL

by adam.bramley /

Share this post on social media

Why design an API from the ground up with GraphQL? Why not use JSON:API? Watch the video to find out, with a live demo of the Mentally Healthy Workplaces platform.

While JSON:API is a powerful out-of-the-box tool, it’s also broad and largely undefined. GraphQL might require more backend development upfront, but it’s easier to read and understand, paying dividends later.

In the video, I demonstrate a use case for GraphQL from our recent project, the Mentally Healthy Workplaces platform. This feature enables anonymous users to create accounts, save resources to their collections and share those with the public.

I also take you through:

  • Kickstarting your GraphQL with Schema and Extensions
  • Writing your own Data Producers
  • How to write secure Mutations to Create, Update, and Delete content on your site
  • A live demo of how this is integrated into React apps

Suggested reading: I highly recommend you check out the GraphQL Gitbook when you’re starting out.

Watch the video

Presented at DrupalSouth 2023 in Wellington.

Related Articles

Decoupled OpenSearch: A Case Study

Watch the video to learn how our team leveraged a highly available AWS OpenSearch service fronted by React to build lightning-fast, dynamic search interfaces backed by Drupal using Search API.

Migrate from drush_cmi_tools for Drupal 9

Prior to Drupal 9, Drush CMI Tools was our standard approach for config management. Drush CMI tools have been deprecated for Drupal 9 and replaced by the Config Ignore 3 community-supported project that provides the same functionality.

How to debug Redis Exceptions in Drupal

Caching issues can be one of the hardest things to track down in a website. This is especially the case when you have external caches involved that can't be entirely replicated on a local stack, like AWS's ElastiCache Redis in clustered mode!