/plushcap/analysis/hasura/build-ecommerce-shopping-cart-reminder-with-hasura-events

Build an e-commerce shopping cart reminder with Hasura Events

What's this blog post about?

In this tutorial, we learn how to use Hasura Events to create an e-commerce shopping cart reminder. First, we set up a Hasura account and make the endpoint available to "public_user" role. Next, we create the users_wishlist table in Hasura with specific fields and permissions for the "public_user" role. Then, we configure the React app to connect to Hasura using Apollo Client or any other GraphQL client. After that, we launch a mutation query and save user preferences. Next, we create an event trigger called "send_wishlists" linked to the schema "public" and table "users_wishlist" on the "Insert" trigger. We then pass a Webhook URL that will be invoked from our Hasura server when this event happens. Finally, we create a serverless function to send an email reminder to the user using an external provider like Emailjet. This application allows users to receive shopping cart reminders without needing to develop custom triggers or watchers, saving time and increasing developer productivity.

Company
Hasura

Date published
Jan. 29, 2021

Author(s)
Harsha

Word count
984

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.