-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: GraphQLGraphQLGraphQLComponent: NewsletterGraphQlFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentPartner: AtwixPull Request is created by partner AtwixPull Request is created by partner AtwixPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Project: GraphQLReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.Affects non-critical data or functionality and does not force users to employ a workaround.Triage: DoneHas been reviewed and prioritized during Triage with Product ManagersHas been reviewed and prioritized during Triage with Product Managersfeature request
Milestone
Description
Description (*)
There is a subscribe field on a standard Magento storefront:
Currently, GraphQl does not have a mutation which allow to subscribe guest/customer into a newsletter subscription.
Expected behavior (*)
Benefits
Additional information
A proposed schema:
type Mutation {
subscribeEmailToNewsletter(input: SubscribeInput): SubscribeOutput @resolver(class: "\\Vendor\\ModuleGraphQl\\Model\\Resolver\\SubscribeEmailToNewsletter") @doc(description:"Adds an email into a newsletter subscription")
}
input SubscribeInput {
email: String! @doc(description: "Email")
}
type SubscribeOutput {
success: Boolean! @doc(description: "Returns 'true' if an email has been added to newsletter successfully")
message: String! @doc(description: "Returns a success or an error messages")
}
Example of usage:
mutation {
subscribeEmailToNewsletter(
input: {
email: "[email protected]"
}
) {
success
message
}
}
Response:
{
"data": {
"subscribeEmailToNewsletter": {
"success": true,
"message": "Thank you for your subscription."
}
}
}
Metadata
Metadata
Assignees
Labels
Component: GraphQLGraphQLGraphQLComponent: NewsletterGraphQlFixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentPartner: AtwixPull Request is created by partner AtwixPull Request is created by partner AtwixPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Project: GraphQLReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.Affects non-critical data or functionality and does not force users to employ a workaround.Triage: DoneHas been reviewed and prioritized during Triage with Product ManagersHas been reviewed and prioritized during Triage with Product Managersfeature request