Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lots of boilerplate for servant-reflex client #19

Open
rubenmoor opened this issue Mar 25, 2021 · 1 comment
Open

lots of boilerplate for servant-reflex client #19

rubenmoor opened this issue Mar 25, 2021 · 1 comment

Comments

@rubenmoor
Copy link

rubenmoor commented Mar 25, 2021

From what I understand, this project uses servant-reflex for a type-safe client, which is great. The price for this seems to be quite a bit of boilerplate for every single api request. Is this some irreducible complexity there?

@rubenmoor rubenmoor changed the title boilerplate for servant-reflex client lots of boilerplate for servant-reflex client Mar 25, 2021
@rubenmoor
Copy link
Author

rubenmoor commented Mar 25, 2021

Using prerender works:

prerender_ (text "") $ do
    res <- lift $ someAutoGeneratedRequest -- ...
    -- ...

For my intents and purposes, this is a solution. I am not quite sure in how far I am limiting myself now - effectively allowing requests only once the Javascript frontend has loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant