Skip to content

shiftx/graphql-faunadb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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',
  },
})