Regenerate Next.js Pages On-demand (ISR) with Hasura Table Events.
Read the blog post for step-by-step directions.
You'll need the following environment variable in your Hasura instance.
SECRET_TOKEN: <a random string you come up with>
NEXTJS_REVALIDATE_URL: <Your nextjs api route>
Open a terminal in the Hasura directory. Now we apply the migrations, metadata, and seeds.
hasura migrate apply --endpoint <Remote Hasura URL if applicable> --admin-secret <admin secret> --database-name default
hasura metadata apply --endpoint <Remote Hasura URL> --admin-secret <admin secret>