←back to thread

153 points michaelanckaert | 5 comments | | HN request time: 0.853s | source
Show context
ianamartin ◴[] No.23485568[source]
Well, that's too bad. I always thought this was a cool project. But if you can't dev your way into decent performance for a small alpha project using python/flask/sql, I don't think your tools are the problem. And I guarantee that a graphql isn't the solution.

So, I mean, good luck.

replies(5): >>23485616 #>>23485627 #>>23485632 #>>23487973 #>>23489310 #
searchableguy ◴[] No.23485627[source]
I didn't read the post that way. I feel scaling is a small issue more so organization. Graphql does make sense for something like source hunt.

Why not use type hints in python? Isn't that a good enough substitute?

I wonder why go instead of rust if he wanted static typing, long term ease of maintanence and performance. Go's type system is not great especially for something like graphql. Gqlgen relies heavily on code generation. Last time I used it, I ran into so many issues. I ditched go together after several painful clashes with it that community always responded with: oh you don't need this.

(yeah except they implemented all those parts in arguably worse ways and ditched community solutions in the next few years)

One major benefit the GP fails to mention is that with graphql, it is easy to generate types for frontend. This makes your frontend far more sane. It's also way easier to test graphql since there are tools to automatically generate queries for performance testing unlike rest.

There is no need to add something for docs or interactivity like swagger.

replies(3): >>23485642 #>>23485652 #>>23485686 #
CameronNemo ◴[] No.23485642[source]
>One major benefit the GP fails to mention is that with graphql, it is easy to generate types for frontend. This makes your frontend far more sane.

By GP (grandparent?) do you mean the article / blog post?

Because if so I see no indication that Drew plans to adopt a SPA architecture -- he seems intent on continuing to use server side rendering with little javascript, which would make "frontend types" sort of irrelevant.

replies(1): >>23485669 #
1. searchableguy ◴[] No.23485669[source]
You don't need spa to take benefits of the generated types from graphql. If you use something like typescript on the backend (SSR app), the types will be stripped out in the end so it doesn't affect your bundle size.
replies(2): >>23485680 #>>23487539 #
2. CameronNemo ◴[] No.23485680[source]
You must understand my confusion when your original comment explicitly states that frontend types can be generated, but your reply here seems to be talking about a javascript/typescript backend service.
replies(1): >>23485706 #
3. searchableguy ◴[] No.23485706[source]
Sorry by backend, I mean your SSR app.
4. vertex-four ◴[] No.23487539[source]
What bundle size? There's no javascript being shipped to the client.
replies(1): >>23487759 #
5. gbear605 ◴[] No.23487759[source]
Technically there is some used for a few things, like a text editor (for writing build manifests) and for payments. But those are very limited and aren’t relevant to the use of GraphQL.