Sketching quadratic graphs