Content Deep Dive
Adding custom business logic to Hasura using Dark
Blog post from Hasura
Post Details
Company
Date Published
Author
Aleksandra
Word Count
1,254
Language
English
Hacker News Points
-
Source URL
Summary
In this article, we explore how to add custom business logic to Hasura using Actions and the programming platform Dark. We create a custom mutation for an online mafia game that assigns roles to players while ensuring certain constraints are met. The process involves defining the mutation, creating an HTTP endpoint in Dark, implementing the handler, and testing it by sending requests. We also demonstrate how to modify the definition of the mutation to return additional information about the game and connect it to the graph using a new relationship.