Graphene-based synthetic antiferromagnets and ferrimagnets