This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<h1>List items</h1> | |
<ul> | |
<li v-for="item in items" :key="item.id"> | |
{{ item.name }} | |
</li> | |
</ul> | |
<button @click="addItem">Add item</button> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type {CodegenConfig} from '@graphql-codegen/cli'; | |
const config: CodegenConfig = { | |
config: { | |
namingConvention: { | |
// Ensure enum values are the same as their name, not a number or camelCased | |
enumValues: 'keep', | |
}, | |
}, | |
schema: ['src/**/schema.graphql'], |
- use Auth0 for logins
- retrieve a Fauna instance secret for the user (see Fauna's ABAC tutorial)
- have the user’s device talk directly to Fauna's native graphql endpoint using their secret for authorization.
At the very least, we need two pieces of functionality:
- Create a user document in Fauna to represent each Auth0 user.
- Exchange an Auth0 JWT for a FaunaDB user secret.