Build and Deploy a GraphQL API to the Edge with Fauna โ€” Part 2

Jamie BartonJamie Barton
1 min read

Fauna is perfect for creating databases and databases inside of databases where you require multi-tenant support for building and scaling applications.

We'll be using a single database in this guide as well as the UI for creating a database and collection but everything you see below can be done using Fauna's FQL syntax.

You'll need to sign up for a Fauna account, create a database, a products collection, and obtain an API key.

  1. Sign up for a Fauna account

  2. Create a new database

  3. Create a product collection

  4. Create a database key (Security > Database Keys > New Key)

  5. Copy the key

  6. Add the key to grafbase/.env:

     FAUNA_SECRET=
    

That's it! We have a Fauna database and collection we can now connect to from inside Grafbase Resolvers. We'll do that next.

Continue to Part 3 ๐Ÿ‘‰

0
Subscribe to my newsletter

Read articles from Jamie Barton directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jamie Barton
Jamie Barton