  We develop the deformation theory of cohomological field theories (CohFTs),
which is done as a special case of a general deformation theory of morphisms of
modular operads. This leads us to introduce two new natural extensions of the
notion of a CohFT: homotopical (necessary to structure chain-level
Gromov--Witten invariants) and quantum (with examples found in the works of
Buryak--Rossi on integrable systems). We introduce a new version of
Kontsevich's graph complex, enriched with tautological classes on the moduli
spaces of stable curves. We use it to study a new universal deformation group
which acts naturally on the moduli spaces of quantum homotopy CohFTs, by
methods due to Merkulov--Willwacher. This group is shown to contain both the
prounipotent Grothendieck--Teichm\"uller group and the Givental group.
