Remix is better than GraphQL
13 points by ahuth 1 year ago | 15 comments- graypegg 1 year agoI’m having a bit of trouble getting the point here, this is more sort of just a passing thought I guess. But yeah, like the article ends with, querying with graphql from the front end, and using loaders from Remix are 2 choices for different situations where they’re ideal. (Unlike the superlative title implies)
- ahuth 1 year agoYep, this was mostly a random thought.
What I should've said: GraphQL isn't the only option for type safety and preventing over fetching. There's a nice REST pattern which Remix happens to do.
- ahuth 1 year ago
- aleksiy123 1 year agoIt's like they are designed for completely different use cases.
Graphql is designed to be flexible for when you want to expose your data to many clients who may be other teams and need different models of the data.
Obviously, if you just need a simple consistent API, there's no need for all the extra complexity.
- ahuth 1 year agoGood point.
My thinking here was kind of half-baked.
Thinking through it some more: - Maybe it's more that I've seen teams reach for GraphQL when another option would've been simpler. - You can get many of GraphQL's benefits with other, simpler solutions. - But when you do need GraphQL, of course go for that.
- ahuth 1 year ago
- andrewingram 1 year agoIf I were using Remix, I'd probably trigger GraphQL queries from route loaders, one doesn't really obviate the other. Yes, there are challenges with using GraphQL well, but there's no inherent tension between it and the loader approach.
- ahuth 1 year agoTrue!
Maybe thinking through what I was thinking a bit more:
GraphQL isn't the only option for preventing overfetching, and has some downsides. For example, the pattern Remix uses.
- ahuth 1 year ago
- fswd 1 year agothis is so bizarre? I use GraphQL with Remix in my loader. It's a great combination. 7ms response from SQL. I can't understand the article. Sorry this person doesn't understand GraphQL nor Remix. might be AI generated
- ahuth 1 year agoNope, I wrote it myself (although maybe poorly!).
GraphQL from a Remix loader is doable. Works great if you have an existing GraphQL you want to consume.
If you don't, though, I prefer avoiding the extra HTTP request.
- ahuth 1 year ago
- paulddraper 1 year agoConway's law.
REST/GraphQL is the result of different teams/orgs working on frontend and backend.
Backend-for-frontend/Remix is the result of the same team working on frontend and backend.
- ahuth 1 year agoHey, nice connection to conway's law! I didn't think about that.
- ahuth 1 year ago
- kamma4434 1 year agoAnd Elixir LiveView is better than Remix as you don’t have a client at all…
- ahuth 1 year agotouché
- ahuth 1 year ago
- 1 year ago
- nov21b 1 year ago[flagged]
- intothemild 1 year agoI believe if you click the link, you can get the answer to your question.
- nov21b 1 year agoI did, it still doesn't make sense to compare the two.
- ahuth 1 year agoDefinitely an apple to oranges comparison.
What I meant (and probably poorly communicated) is that you don't necessarily need GraphQL and its challenges to get type safety and prevent overfetching. There's a nice REST pattern that can do that, which happens to be what Remxi uses.
- ahuth 1 year ago
- nov21b 1 year ago
- intothemild 1 year ago