18

Hey, I'm not a fan of advertising libraries, but otherwise, nobody will know them. I think this package is really spot on and solves many issues with current web technologies.

I'd like to continue this project. If you found it interesting please give some feedback.

github.com/fxdave/cuple
intro: The Missing Type-Safety for Full-Stack

top 2 comments
sorted by: hot top controversial new old
[-] DmMacniel@feddit.de 1 points 5 months ago

How does it compares to GraphQL?

[-] fxdave@lemmy.ml 4 points 5 months ago* (last edited 5 months ago)

Thanks for the question. GraphQL works with multiple languages, Cuple works only with Typescript. Despite this drawback this also gives you some advantages:

  • The Request and Response types are auto-inferred from the endpoint you write
  • Because the types are in Typescript you don't need to generate a client, you just simply use it with @cuple/client and get instant feedback.
  • You don't have to learn another language. It's just typescript.

Practically it means less boilerplate and it let's you focus on the feature you write. Cuple is also not a query language, you get what the server sends you, it's more likely a type-safe FFI binding. With Cuple you can build a REST API, or anything similar to that with HTTP method, header, path, query, body, and you can use it type-safely.

this post was submitted on 03 Jun 2024
18 points (87.5% liked)

Programming

17314 readers
153 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS