Hydrogen / Subscribe to a newsletter

Hi Team,

Is there a straightforward way to create “Subscribe to our newsletter” form? Hydrogen uses graphql to communicate with Storefront API and I was trying to find a mutation that would create Email Subscriber (not a store customer) without success. Is this possible with Hydrogen and Shopify or should I fallback to 3rd party provider?

4 Likes

I’m curious about this too

https://github.com/Shopify/hydrogen/blob/e202b0a65acfb653318099c0c7ad1a164967a37f/examples/api-routes/src/components/NewsletterForm.client.jsx#L4

https://shopify.dev/api/admin-graphql/2022-10/mutations/customerCreate#examples-Create_a_customer_subscribed_to_SMS_marketing
^this looks promising

Hey @benbenben-bb , did you manage to solve this with the code you linked to?

1 Like

Did anybody find a solution for this?

I’m also looking for an answer to this. The best I could find is this: https://github.com/Shopify/storefront-api-feedback/discussions/124

It sounds like updates are being made to the storefront API, but I haven’t seen any recent communication about this yet.