
Ask HN: Should I use golang for building a graphql API - dbetteridge
I&#x27;m at the early stages of building an API, i&#x27;ve laid out my database structure and some idea of the functions&#x2F;features I need from it.<p>However i&#x27;m a bit stuck on language for building the API itself, there will be a need for document upload and full user role based access control.<p>Is Go&#x27;s graphql setup mature enough for this use case, or will I need to be building a lot from scratch, would something like Python with Django or Flask be a better choice for getting something off the ground ASAP?<p>Thanks!
======
nikolasburk
Go is a great language for building GraphQL servers, the
[https://github.com/99designs/gqlgen](https://github.com/99designs/gqlgen)
library helps you by build type-safe GraphQL servers and reduces the
boilerplate. You can find an example here: [https://github.com/prisma/prisma-
examples/tree/master/go/gra...](https://github.com/prisma/prisma-
examples/tree/master/go/graphql)

Otherwise I'd recommend TypeScript - the tooling ecosystem around GraphQL is
definitely most advanced in the JS space. If you're interested, you can check
out an example here: [https://github.com/prisma/prisma-
examples/tree/master/typesc...](https://github.com/prisma/prisma-
examples/tree/master/typescript/graphql)

~~~
ioddly
Thanks for the heads up on gqlgen. Have you used its subscription + websocket
functionality? This is the part I haven't figured out with graphql-go yet.

------
ioddly
I'm using graphql-go/graphql at the moment. Sparse documentation, but
everything seems to work correctly. I'm not too familiar with the Python
GraphQL stuff, but here I'm writing my own schema and resolvers, so I guess it
depends on what you mean from "by scratch."

If you need something off the ground ASAP, maybe look at something like Hasura
or Postgraphile: point it at your DB and get the GraphQL resolvers.

~~~
dbetteridge
I have started with graphql-go/graphql but the lack of documentation is what i
was getting at with the maturity aspect.

Thanks for the suggestions

------
smt88
Strong, structural type systems are a good fit for GraphQL back ends. You
should look into TypeScript and Reason before you decide.

