Skip to content

Latest commit

 

History

History
21 lines (11 loc) · 815 Bytes

DATABASE.md

File metadata and controls

21 lines (11 loc) · 815 Bytes

Database

Uses FaunaDB for a DB designed for serverless architectures.

FaunaDB for SQL Users

Rather than spending time figuring out the Functions concept in FaunaDB, I have chosen to let FaunaDB do it's automatic Mutations, and then I will guard calls to FaunaDB inside /api/db/* routes to add any extra logic that I want.

This also acts as a buffer between be and FaunaDB if I want to change my database behind the scenes.

Schema

I construct my initial FaunaDB collections and shape by importing a graphql schema definition.

The schema provided to FaunaDB can be see here.

Types

The Typescript types can be seen here.