feathers-graph-populate
Version:
Add lightning fast, GraphQL-like populates to your FeathersJS API.
17 lines (12 loc) • 563 B
text/typescript
import { GraphPopulateApplication } from './graph-populate.class'
import serviceMixin from './graph-populate.service-mixin'
import type { Application } from '@feathersjs/feathers'
import type { InitOptions } from '../types'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function initApp(options?: InitOptions): (app: Application) => void {
return (app: Application): void => {
const graphPopulate = new GraphPopulateApplication(app, options)
;(app as any).graphPopulate = graphPopulate
app.mixins.push(serviceMixin)
}
}