hongbo-miao/hongbomiao.com

View on GitHub
api-node/src/graphQL/dataLoaders/dataLoaders.ts

Summary

Maintainability
A
0 mins
Test Coverage
import DataLoader from 'dataloader';
import planetDataLoader from './planetDataLoader';
import starshipDataLoader from './starshipDataLoader';
import userDataLoader from './userDataLoader';

const dataLoaders = (): Record<string, DataLoader<string, unknown>> => ({
  planet: planetDataLoader(),
  starship: starshipDataLoader(),
  user: userDataLoader(),
});

export default dataLoaders;