Fecal IgM and IgG to specific epitopes were negatively associated with high‐density lipoprotein (HDL) cholesterol in T2D patients before surgery, but no association was seen after the surgery. This evidence concerns the gene CD40LG and type 2 diabetes mellitus.