Monoid algebras and graph products