Options
All
  • Public
  • Public/Protected
  • All
Menu

Module mongo-apollo/server

Index

References

GraphQLObjectIdTypeName

Re-exports GraphQLObjectIdTypeName

MongoId

Re-exports MongoId

Variables

Const objectIdResolvers

objectIdResolvers: { GraphQLObjectId: GraphQLScalarType } = ...

Type declaration

  • GraphQLObjectId: GraphQLScalarType

Const objectIdTypeDefs

objectIdTypeDefs: string = ...

NOTE: the type is ObjectID to be consistent with GraphQL "ID" type Be careful with the casing

Functions

Const addDefaultMongoConnector

  • addDefaultMongoConnector(models: VulcanGraphqlModelServer[], connectorOptions?: Pick<MongooseConnectorOptions, "mongooseInstance">): VulcanGraphqlModelServer[]
  • Add default Mongo connector and dataSource to models

    For a custom behaviour, you can set the connector and createDataSource manually when creating your model

    Parameters

    • models: VulcanGraphqlModelServer[]
    • Optional connectorOptions: Pick<MongooseConnectorOptions, "mongooseInstance">

    Returns VulcanGraphqlModelServer[]

Const createMongooseDataSource

  • createMongooseDataSource(model: VulcanGraphqlModelServer, connector: Connector<any, any, any, any>): undefined | MongoDataSource<any, any>
  • Create a mongoose data source

    Parameters

    • model: VulcanGraphqlModelServer
    • connector: Connector<any, any, any, any>

    Returns undefined | MongoDataSource<any, any>

Generated using TypeDoc