Are mandatory notifications GDPR compliant?

I have designed a notification center for my app.
I would like to make sure users can’t turn – off some types of in-app notifications: comments and replies.
Our app should be GDPR compliant. Is it okay to keep some of the notification type…