In general, doctrine is all Church teaching in matters of faith and morals. Dogma is more narrowly defined as that part of doctrine which has been divinely revealed and which the Church has formally defined and declared to be believed as revealed.
The Catechism of the Catholic Church (CCC) teaches, “The Church’s Magisterium exercises the authority it holds from Christ to the fullest extent when it defines dogmas, that is, when it proposes, in a form obliging the Christian people to an irrevocable adherence of faith, truths contained in divine Revelation or also when it proposes, in a definitive way, truths having a necessary connection with these” (CCC 88).
Concerning the Church’s teaching that Mary is the Mediatrix of all graces, while this doctrine has been divinely revealed, it has not yet been - although could be - elevated to dogma. Dr. Ludwig Ott in Fundamentals of Catholic Dogma (p. 215) explains, “The doctrine of Mary’s Universal Mediation of Grace based on her co-operation in the Incarnation is so definitely manifest in the sources of the Faith, that nothing stands in the way of a dogmatic definition”.