/**
 * Student BFF Resolver 装配入口.
 *
 * 将所有 Resolver 合并为一个 GraphQL Resolver 映射表,
 * 供 GraphQL Yoga makeExecutableSchema 使用.
 *
 * Resolver 清单 (按 schema 第一版):
 *   Query:
 *     - currentUser (auth)
 *     - studentDashboard (dashboard)
 *     - myHomework (homework)
 *     - myGrades (grades)
 *     - myExams (exams)
 *     - myClasses (classes)
 *     - textbooks / chapters / learningPath (content, P4)
 *     - myWeakness / myTrend (analytics, P4)
 *     - myNotifications / myNotificationUnreadCount (notifications, P5)
 *     - aiChat (ai, P5)
 *   Mutation:
 *     - submitHomework (homework)
 *     - markNotificationAsRead (notifications, P5)
 *   Subscription:
 *     - aiStreamChat (ai-stream, P5 SSE)
 */
import { authResolvers } from "./auth.resolver.js";
import { dashboardResolvers } from "./dashboard.resolver.js";
import { homeworkResolvers } from "./homework.resolver.js";
import { gradesResolvers } from "./grades.resolver.js";
import { examsResolvers } from "./exams.resolver.js";
import { classesResolvers } from "./classes.resolver.js";
import { contentResolvers } from "./content.resolver.js";
import { analyticsResolvers } from "./analytics.resolver.js";
import { notificationsResolvers } from "./notifications.resolver.js";
import { aiResolvers } from "./ai.resolver.js";
import { aiStreamResolvers } from "./ai-stream.resolver.js";

/**
 * 全部 Resolver 手动合并 (spread 运算符).
 *
 * 注意: 各 resolver 文件导出的对象结构为 { Query: {...}, Mutation: {...}, Subscription: {...} },
 * 这里按 Query/Mutation/Subscription 分别合并字段.
 */
export const studentBffResolvers = {
  Query: {
    ...(authResolvers.Query ?? {}),
    ...(dashboardResolvers.Query ?? {}),
    ...(homeworkResolvers.Query ?? {}),
    ...(gradesResolvers.Query ?? {}),
    ...(examsResolvers.Query ?? {}),
    ...(classesResolvers.Query ?? {}),
    ...(contentResolvers.Query ?? {}),
    ...(analyticsResolvers.Query ?? {}),
    ...(notificationsResolvers.Query ?? {}),
    ...(aiResolvers.Query ?? {}),
  },
  Mutation: {
    ...(homeworkResolvers.Mutation ?? {}),
    ...(notificationsResolvers.Mutation ?? {}),
  },
  Subscription: {
    ...(aiStreamResolvers.Subscription ?? {}),
  },
};
