Fullstack GraphQL with RedwoodJS and AppSync | GraphQL Denver
Published:
Anthony Campolo demonstrates building GraphQL applications with RedwoodJS for full-stack development and AWS AppSync for cloud APIs, showcasing integration between the two.
Episode Summary
In this presentation, Anthony Campolo explores the use of RedwoodJS and AWS AppSync for building GraphQL applications. He begins by introducing RedwoodJS as a full-stack framework that brings together front-end and back-end development in a monorepo structure. Campolo demonstrates how to create a simple application using RedwoodJS, highlighting its built-in GraphQL capabilities and the ease of generating pages, layouts, and database models. He then shifts focus to AWS AppSync, showing how to create a GraphQL API that connects to a DynamoDB database. The presentation concludes with an example of integrating RedwoodJS and AWS AppSync, based on a community member’s project. Throughout the talk, Campolo emphasizes the benefits of these tools in simplifying GraphQL implementation and discusses their potential for developers looking to leverage GraphQL in their projects.
Chapters
00:00 - Introduction to RedwoodJS and AWS AppSync
Anthony Campolo introduces himself and outlines the goals of the presentation. He explains that he will be demonstrating RedwoodJS and AWS AppSync, two projects built around GraphQL. Campolo mentions that he’ll be creating simple “hello world” applications with both technologies and then showcasing a community member’s project that integrates the two. He assumes basic GraphQL knowledge from the audience but not familiarity with Redwood or AWS. This chapter sets the stage for the technical demonstrations to follow and provides context for the importance of these tools in the GraphQL ecosystem.
02:56 - Building a Simple Application with RedwoodJS
Campolo begins the hands-on demonstration of RedwoodJS by creating a new project. He explains the monorepo structure of Redwood, highlighting how it combines front-end and back-end development in a single project. The chapter covers generating pages, creating layouts, and introducing Prisma as the ORM for database interactions. Campolo demonstrates how to create a simple blog post model, run migrations, and scaffold out a basic CRUD interface. He then delves into Redwood’s “cell” concept for data fetching, showing how it simplifies the process of querying the backend from the frontend using GraphQL. This section provides a comprehensive overview of Redwood’s key features and its integration of GraphQL.
15:23 - Creating a GraphQL API with AWS AppSync
Shifting focus, Campolo introduces AWS AppSync as a managed service for GraphQL APIs. He walks through the process of creating a basic API from scratch, defining the schema, and connecting it to a DynamoDB database. The demonstration covers creating queries and mutations, and shows how to interact with the API using the built-in query interface. Campolo highlights the automatic documentation and error handling features of AppSync, emphasizing how it simplifies the process of creating and managing GraphQL APIs. This chapter provides insights into how AWS AppSync can be used to quickly set up a cloud-based GraphQL API with minimal configuration.
20:08 - Integrating RedwoodJS with AWS AppSync
In the final section, Campolo discusses a community member’s project that combines RedwoodJS with AWS AppSync. He walks through the key components of the integration, including setting up the schema, using the GraphQL request library, and configuring the endpoint and API key. This chapter demonstrates how developers can leverage the strengths of both RedwoodJS and AWS AppSync in a single project, providing a real-world example of their combined use. Campolo concludes by discussing the potential of this integration and encouraging further exploration of these technologies.
22:50 - Q&A Session
The presentation concludes with a Q&A session where Campolo addresses audience questions. Topics covered include using AWS AppSync with other AWS services, the ability to swap out Apollo client in RedwoodJS, and discussions about dynamic schema generation. Campolo also touches on more advanced topics like Apollo Federation and GraphQL mesh. This chapter provides additional insights and clarifications on the presented technologies and explores some more advanced concepts in the GraphQL ecosystem.