ajcwebdev
Video cover art for Creating a Monolithic Mesh of GraphQL APIs | StepZen

Creating a Monolithic Mesh of GraphQL APIs | StepZen

Published:

Anthony Campolo demonstrates how to create a monolithic mesh of GraphQL APIs using StepZen, RedwoodJS, and various cloud services including Railway and Netlify.

Episode Summary

In this stream, Anthony Campolo, a developer advocate at StepZen, demonstrates how to create a monolithic mesh of GraphQL APIs. He walks through the process of setting up two separate Redwood applications, each with its own GraphQL API connected to a Postgres database. These applications are deployed as Netlify functions (AWS Lambda). The stream covers the entire workflow from initializing the projects, setting up databases using Railway, scaffolding models, deploying to Netlify, and finally using StepZen to merge the two APIs into a single GraphQL endpoint. Anthony emphasizes the ease and speed of this process, highlighting that all tools used are available on free tiers, making it accessible for developers to prototype and experiment with these technologies.

Chapters

00:00 - Introduction and Project Overview

Anthony Campolo introduces himself and provides an overview of the project he’ll be demonstrating. He explains that the goal is to create a monolithic mesh of GraphQL APIs by stitching together multiple APIs into a single endpoint. The project involves using Redwood APIs connected to Postgres databases, deployed on Netlify functions (AWS Lambda). Anthony emphasizes that this demonstration is a culmination of various features and projects he’s been working on. He describes the process as a “mad scientist experiment” that will help viewers understand how to generalize this approach for their own projects. This chapter sets the stage for the technical demonstration that follows, giving viewers a high-level understanding of what they’ll be learning.

02:56 - Setting Up the First Redwood Application (Posts)

Anthony begins the hands-on demonstration by setting up the first Redwood application for managing blog posts. He starts by showing the schema for the posts, which includes fields for ID, title, body, and creation date. Anthony then walks through the process of initializing the Redwood project, setting up a Postgres database using Railway, and using Prisma to manage the database schema and migrations. He demonstrates how to use Redwood’s scaffolding feature to quickly generate the necessary code for creating and managing blog posts. This chapter provides a detailed look at the initial setup process, showcasing the efficiency of using modern development tools and frameworks to rapidly prototype applications.

08:46 - Creating the Second Redwood Application (Users)

Anthony moves on to creating the second Redwood application, this time focused on managing users. He follows a similar process to the first application, demonstrating how to set up the schema, initialize the project, and scaffold the necessary components. This chapter highlights the consistency and repeatability of the process, showing how developers can quickly spin up multiple related applications using the same tools and techniques. Anthony also touches on alternative deployment options, mentioning that while he’s using Netlify, similar processes could be followed with Vercel or Render.

14:51 - Deploying Applications and Troubleshooting

This chapter covers the deployment process for both Redwood applications to Netlify. Anthony walks through the steps of creating Git repositories, pushing the code, and setting up the Netlify deployments. He encounters and resolves a few minor issues along the way, providing valuable insights into common troubleshooting steps. This section also demonstrates how to set up environment variables in Netlify for database connections. Anthony emphasizes the ease of tearing down and recreating these deployments, highlighting the flexibility of modern cloud services for prototyping and development.

17:38 - Merging APIs with StepZen

In the final chapter, Anthony demonstrates how to use StepZen to create a single schema that merges the two separate Redwood APIs. He explains the structure of the StepZen configuration, showing how to declare types and queries that map to the deployed Netlify functions. Anthony then runs the StepZen CLI to start the merged API locally and tests it using Insomnia. This chapter showcases the power of API composition, demonstrating how developers can combine multiple data sources into a single, cohesive GraphQL API. Anthony concludes by successfully querying both users and posts through the unified StepZen endpoint, bringing the entire demonstration full circle.