-
Notifications
You must be signed in to change notification settings - Fork 1.7k
magento/devdocs#7366: GraphQl. subscribeEmailToNewsletter. Mutation for subscribe feature. #7422
magento/devdocs#7366: GraphQl. subscribeEmailToNewsletter. Mutation for subscribe feature. #7422
Conversation
An admin must run tests on this PR before it can be merged. |
293550f
to
2c1525e
Compare
2c1525e
to
b750512
Compare
|
||
## Input arguments | ||
|
||
Mutation contains a required `email` argument specified an email address which should be added into a newsletter subscription. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mutation contains a required `email` argument specified an email address which should be added into a newsletter subscription. | |
Mutation contains a required `email` parameter that specifies an email address that should be added into a newsletter subscription. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implemented
|
||
### SubscriptionStatusesEnum object | ||
|
||
In general, the `SubscriptionStatusesEnum` object can return one of the following values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be precise, the SubscriptionStatusesEnum
is not an "object" but a "set of possible states"
I would suggest the following
In general, the `SubscriptionStatusesEnum` object can return one of the following values: | |
The `SubscriptionStatusesEnum` is a predefined set of possible subscription statuses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implemented
`UNSUBSCRIBED` | Email address is unsubscribed. | ||
`UNCONFIRMED` | Specified email ties to customer which did not confirm a required customer registration. | ||
|
||
For the `subscribeEmailToNewsletter` mutation the `SubscriptionStatusesEnum` object may return only 2 of them: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the `subscribeEmailToNewsletter` mutation the `SubscriptionStatusesEnum` object may return only 2 of them: | |
The `subscribeEmailToNewsletter` mutation for the `status` field may return only the following statuses: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor adjustment just to mention that SubscriptionStatusesEnum cannot physically return anything since it's like an array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep.
implemented
b750512
to
82dd032
Compare
@rogyar , all your suggestions have been implemented. Could you please review? Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention that Magento must be configured to allow guests to subscribe.
I think it might be worthwhile to mention the Store request header.
Check whether my rewrite of the UNCONFIRMED enum description is correct.
@atwixfirster I'm pinging you to make sure you're aware that I requested some updates to to #7422 |
By default, Magento allows a newsletter subscription for quests. Reference to source: https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Newsletter/etc/config.xml#L15
approved :) Thank you so much for your grammatical fixes. |
running tests |
Hi @atwixfirster, thank you for your contribution! |
Purpose of this pull request
This pull request (PR) adds a new topic subscribeEmailToNewsletter mutation requested in #7366.
Affected DevDocs pages
Links to Magento source code
whatsnew
Added the
subscribeEmailToNewsletter
mutation to the GraphQL Developer Guide.