Skip to main content

Fauna

Fauna is a developer-friendly transactional database that is accessible through a GraphQL API.

Connect Fauna

You can connect new services from the Schema page. To get there, open your project's Schema tab. Then, use the "Connect Service" button at the top of the services list, then pick "Fauna" from the gallery of available services.

Decide the Name, Slug, and Namespace to use within your API. Then, provide the Endpoint, and a Key from the Fauna database. After you've filled everything in, hit save.

Create a Fauna Database

To create a Fauna Database, log into your Fauna account and from the dashboard select "Create Database"

Give the new database a name and select a Region Group. Optionally check "Use demo data" if you want your database to be bootstrapped with sample tables and data and usable right away for testing.

Create a Fauna authentication token

To create an authentication key for Fauna, log in to your Fauna account then access [Database] → Security → Keys → "New Key".

Select a role with the necessary permissions for TakeShape to access Fauna. The "Server" role is sufficient without giving the key access to all databases in your Fauna account.

Take note of the generated key. This is the only time you'll be able to copy the generated key.

Get the Fauna database GraphQL endpoint

Go to the "GraphQL" page and take note of the endpoint URL visible in the API explorer. See Fauna's list of valid endpoints.

Add Fauna queries to your API

After successfully saving your service, you'll be prompted to add queries and mutations to your API.

You can always add more queries to your API Mesh later by visiting the connected service page and using the "Select Fauna Queries / Mutations" button.