Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface VulcanGenericDataSource<TDocument>

A valid data source in Vulcan must include this API

Based on Mongo data source API

You can use SQL data sources as well as long as they implement this field

see

https://www.apollographql.com/docs/apollo-server/data/data-sources/

see

https://github.com/GraphQLGuide/apollo-datasource-mongodb/

see

https://github.com/GraphQLGuide/apollo-datasource-mongodb/#api

Type parameters

  • TDocument = any

Hierarchy

  • DataSource
    • VulcanGenericDataSource

Index

Methods

findByFields

  • findByFields(fields: {}): Promise<TDocument[]>
  • Parameters

    • fields: {}
      • [fieldName: string]: any

    Returns Promise<TDocument[]>

findManyByIds

  • findManyByIds(ids: string[]): Promise<TDocument[]>
  • Parameters

    • ids: string[]

    Returns Promise<TDocument[]>

findOneById

  • findOneById(id: string): Promise<TDocument>
  • Parameters

    • id: string

    Returns Promise<TDocument>

Optional initialize

  • initialize(config: DataSourceConfig<any>): void | Promise<void>
  • Parameters

    • config: DataSourceConfig<any>

    Returns void | Promise<void>

Generated using TypeDoc