How to subscribe Email To Newsletter mutation GraphQl Magento?

Magento Subscribe Email to Newsletter by GraphQl mutation used to dynamic subscribe email id to store newsletter.

You can create a mutation like the given,

mutation {
  subscribeEmailToNewsletter(
    email: "your@email.id"
  ) {
    status
  }
}

In the mutation, the email field is mandatory.

The Response status of the mutation would be one of the from the list given,

NOT_ACTIVE
SUBSCRIBED
UNSUBSCRIBED
UNCONFIRMED