import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Child } from '../database/entities/child.entity';
import { Activity } from '../database/entities/activity.entity';
import { FamilyMember } from '../database/entities/family-member.entity';
import { User } from '../database/entities/user.entity';
import { DashboardResolver } from './resolvers/dashboard.resolver';
import { ActivityResolver } from './resolvers/activity.resolver';
import { ChildResolver } from './resolvers/child.resolver';
import { ChildDataLoader } from './dataloaders/child.dataloader';
import { UserDataLoader } from './dataloaders/user.dataloader';
import { TrackingService } from '../modules/tracking/tracking.service';
import { ChildrenService } from '../modules/children/children.service';

@Module({
  imports: [TypeOrmModule.forFeature([Child, Activity, FamilyMember, User])],
  providers: [
    DashboardResolver,
    ActivityResolver,
    ChildResolver,
    ChildDataLoader,
    UserDataLoader,
    TrackingService,
    ChildrenService,
  ],
  exports: [ChildDataLoader, UserDataLoader],
})
export class GraphQLCustomModule {}
