graphql-faunadb

A collection of types and functions to pair GraphQL with FaunaDB

Usage no npm install needed!

<script type="module">
  import graphqlFaunadb from 'https://cdn.skypack.dev/graphql-faunadb';
</script>

README

GraphQL-FaunaDB

A collection of types and helpers to pair GraphQL with FaunaDB

Types

GraphQLFaunaTimestampType

GraphQLFaunaPageType

GraphQLFaunaCursorType

GraphQLFaunaClassType

Usage

// const PostId = new GraphQLFaunaIdType({
//   name: 'PostId',
//   fauna: {
//     class: 'posts',
//   }
// })

const Posts = new GraphQLFaunaClassType({
  name: 'Post',
  fields: () => {
    // id: PostId,
    title: GraphQLString,
  },
  fauna: {
    class: 'posts',
  },
})