Home
Starting Up
Case Studies DB
Products
Ideas DB
Subscribe to IH+
Starting Up
Case Studies
Ideas DB
Products DB
Sign in
Join
5
Likes
4
Comments
Ask IH: GraphQL, did you use it or do you plan to use it?
By
Dinesh Raman
November 23, 2018
Calling all indie hackers to share their story / experience using graphql.
Why did you choose graphql?
What's your graphql tech stack?
What did you learn?
Hey there! I haven't used GraphQL for a startup yet, but we do use it for our new project at work.
Prisma was new to me when I was starting with the project, but it is the real difference maker in this tech stack. It is an ORM-like database wrapper that lets you interface with the database in GraphQL. If you haven't used SQL much, this approach feels a lot more natural and comprehensible. It has neat tools too, like a playground, and one-line deploys. My experience with it has been wonderful so far!
I read a lot of positive things about it.
FE: Apollo
BE: Absinthe(Elixir)
I'm using GraphQL in my project and I can tell you it is great, and in a lot of cases better than REST. It saves you a lot of time specially with stuff like pagination, security, multi-query, etc. Also you have to be careful defining your types and the relations within them, specially when working with permissions.
Why did I choose it?
What's my GQL tech stack?
What did I learn?
I just wanted to try it. I was unhappy with a de-facto CRUD aka REST APIs industry standard.
FE: custom
BE: graphql-tools (Apollo)
From my point of view the best (not obvious) parts are:
In my case adopting GraphQL reduced around 80% of boilerplate code connected to validations, error handling, endpoint mappings, data joining, etc.
I'm rather skeptical about the hype around new technologies, but in this case I can honestly recommend GraphQL.
There is one caveat, however. With GraphQL it is very easy to fire big queries that will be translated into many DB queries in the backend. Watch out for those. Check out this library which may help in such situations:
https://github.com/facebook/dataloader