Files
manoon-headless/src/lib/saleor/create-webhooks.graphql
Unchained b8b3a57e6f feat: Add Saleor webhook handler with Resend email integration
- Add Resend SDK for transactional emails
- Create React Email templates for order events:
  - OrderConfirmation
  - OrderShipped
  - OrderCancelled
  - OrderPaid
- Multi-language support (SR, EN, DE, FR)
- Customer emails in their language
- Admin emails in English to me@hytham.me and tamara@hytham.me
- Webhook handler at /api/webhooks/saleor
- Supports: ORDER_CONFIRMED, ORDER_FULLY_PAID, ORDER_CANCELLED, ORDER_FULFILLED
- Add GraphQL mutation to create webhooks in Saleor
- Add Resend API key to .env.local
2026-03-25 10:10:57 +02:00

78 lines
1.3 KiB
GraphQL

mutation CreateSaleorWebhooks {
orderConfirmedWebhook: webhookCreate(input: {
name: "Resend - Order Confirmed"
targetUrl: "https://manoonoils.com/api/webhooks/saleor"
events: [ORDER_CONFIRMED]
isActive: true
}) {
webhook {
id
name
targetUrl
isActive
}
errors {
field
message
code
}
}
orderPaidWebhook: webhookCreate(input: {
name: "Resend - Order Paid"
targetUrl: "https://manoonoils.com/api/webhooks/saleor"
events: [ORDER_FULLY_PAID]
isActive: true
}) {
webhook {
id
name
targetUrl
isActive
}
errors {
field
message
code
}
}
orderCancelledWebhook: webhookCreate(input: {
name: "Resend - Order Cancelled"
targetUrl: "https://manoonoils.com/api/webhooks/saleor"
events: [ORDER_CANCELLED]
isActive: true
}) {
webhook {
id
name
targetUrl
isActive
}
errors {
field
message
code
}
}
orderFulfilledWebhook: webhookCreate(input: {
name: "Resend - Order Fulfilled"
targetUrl: "https://manoonoils.com/api/webhooks/saleor"
events: [ORDER_FULFILLED]
isActive: true
}) {
webhook {
id
name
targetUrl
isActive
}
errors {
field
message
code
}
}
}