NestJS Zero to Hero 17 — GraphQL Code-first, DataLoader và Query Safety
Thêm GraphQL adapter lên cùng use case, thiết kế schema/pagination/error/auth, giải N+1 bằng DataLoader và giới hạn depth/complexity/operation.
Filter/Tag
6 entries
Thêm GraphQL adapter lên cùng use case, thiết kế schema/pagination/error/auth, giải N+1 bằng DataLoader và giới hạn depth/complexity/operation.
Làm chủ mapped type nâng cao: homomorphic mapping, modifiers, key remapping/filtering, string-number-symbol keys và API sinh từ schema mà vẫn giữ contract dễ kiểm thử.
Dùng distributive conditional, mapped union và union-to-intersection để giữ correlation cho event/job API; tránh bẫy keyof union, union ordering và generic explosion.
Thiết kế inference như public contract: contextual typing, candidate collection, literal preservation, partial inference, NoInfer, higher-order API và type tests cho config, query, builder.
Thiết kế contract cho kb-task-card: attribute primitive, property có type, boolean reflection, method có chủ đích và CustomEvent để Kanban giao tiếp lỏng.
Thiết kế generic API để compiler suy luận từ input, dùng constraints, const type parameters, overload đúng chỗ và tránh conditional type làm public API khó hiểu.