Options
All
  • Public
  • Public/Protected
  • All
Menu

typescript-graphql-starter

Index

Variables

Const AuthorModel

AuthorModel: Model<Author & Document, __type> & Author & Author = new Author().getModelForClass(Author)

Const BookModel

BookModel: Model<Book & Document, __type> & Book & Book = new Book().getModelForClass(Book)

Const ObjectIdScalar

ObjectIdScalar: GraphQLScalarType = new GraphQLScalarType({name: 'ObjectId',description: 'Mongo object id scalar type',parseValue(value: string) {return new Types.ObjectId(value) // value from the client input variables},serialize(value: Types.ObjectId) {return value.toHexString() // value sent to the client},parseLiteral(ast) {if (ast.kind === Kind.STRING) {return new Types.ObjectId(ast.value) // value from the client query}return null}})

Functions

bootstrap

  • bootstrap(): Promise<void>

Object literals

Const config

config: object

dbURL

dbURL: string = "mongodb://localhost:27017/books"

Generated using TypeDoc