Closed amitaibu closed 1 year ago
This breaks the design of what other people would expect createRecord
to behave. I'd rather make a new function like createLandingPageWithParagraphCTA :: LandingPage -> IO (LandingPage, ParagraphCta)
or createEmptyLandingPage :: LandingPage -> IO (LandingPage, ParagraphCta)
:+1:
Yeah, I felt it might be a little weird. I was exploring something similar to Drupal's hook_node_insert
- where one can "hook" and operate whenever a new node entity is created.
But I guess createLandingPageWithParagraphCTA
aligns more with how Haskell and IHP.
PHP /= Haskell :smile:
I asked on Slack and came up with an answer.
I still wonder if it's a valid approach, not sure. @mpscholten What do you think?