Build and Deploy a GraphQL API to the Edge with Fauna โ Part 1
In this series, we will build a GraphQL API with Grafbase, and persist data with Fauna.
Here's a breakdown of what we'll be building:
This is part 1
Grafbase
Grafbase simplifies the process of creating and implementing your personalized GraphQL API at the edge while ensuring complete end-to-end type safety.
By using resolvers and connectors, Grafbase allows seamless integration with any data source. Additionally, you can take advantage of features such as edge caching, authentication and permission rules configuration, serverless search functionality, and more.
Grafbase's versatility extends to local development as well, thanks to the Grafbase CLI. Each Git branch has its preview deployment, facilitating convenient testing and collaboration.
Fauna
Fauna is a highly scalable and flexible globally distributed serverless database. It's ideal for businesses offering multi-tenant services with nested databases. Fauna supports ACID transactions for reliable and secure data operations.
Fauna also provides fine-grained access control for controlled data access. With built-in GraphQL support, Fauna simplifies the development of GraphQL-powered applications by automatically generating schemas.
1. Set up Grafbase
Begin by creating a new Grafbase project. If you have an existing frontend that you want to create a GraphQL API, you must run the following command inside that project directory:
npx grafbase init graphql-fauna-api
This command will ask if you want to create a project using GraphQL SDL or TypeScript.
That's it! You now have a Grafbase project set up and ready to use. We'll learn how to deploy this to Grafbase at the edge at the end of this series.
Subscribe to my newsletter
Read articles from Jamie Barton directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by