News for hackers. Stuff that matters.
Re:Show HN: Generating GraphQL servers for Go by Blackstone4 on Sunday February 11, 2018 @09:15AM (#16352759)
Background: I've been using Typescript + graphql-yoga/apollo-server/express + Prisma to create a GraphQL server. I'm not familiar with golang.

I found this interesting. So just to check my understanding, does this auto generate the routing for the incoming GraphQL queries and mutations? Then you implement the resolvers / db components?

Re:Show HN: Generating GraphQL servers for Go by Blackstone4 on Sunday February 11, 2018 @09:22AM (#16352779)
I'm also interested in hearing your thoughts on the maturity of the golang GraphQL ecosystem?

I've mostly been looking at the JS space and there's a lot of tooling. Having said that my experience has been that it's easy to write a simple GraphQL server but it gets complicated fast. I've been using Prisma which does a lot of the heavy lifting for you. It's relatively new so does come with trade-offs.

Re:Show HN: Generating GraphQL servers for Go by vektah on Sunday February 11, 2018 @09:52AM (#16352871)
I think its still pretty early days, the easy stuff is fine. Once you throw in data loading or subscriptions you quickly run out of docs or find that its just flat out unsupported.

I'm hoping to change that though :)

Re:Show HN: Generating GraphQL servers for Go by sebastian on Sunday February 11, 2018 @09:25AM (#16352793)
Check out https://dgraph.io/ . I haven't had the chance to use it yet, but I have been following its development for a while. Definitely worth looking into.
Re:Show HN: Generating GraphQL servers for Go by Blackstone4 on Sunday February 11, 2018 @09:52AM (#16352874)
Looks interesting. Shame the syntax is GraphQL-like but not pure GraphQL.
Re:Show HN: Generating GraphQL servers for Go by Blackstone4 on Sunday February 11, 2018 @09:58AM (#16352901)
Looks like GraphQL compatibility is on the roadmap for 2018

https://github.com/dgraph-io/dgraph/issues/1966

Re:Show HN: Generating GraphQL servers for Go by vektah on Sunday February 11, 2018 @09:44AM (#16352850)
Yeah, it takes your schema and your models and generates as much of the resolver graph as it can, then leaves you with an interface to implement for the bits it cant (usually trips back to the db).
Re:Show HN: Generating GraphQL servers for Go by thangngoc89 on Sunday February 11, 2018 @09:24AM (#16352787)
This only generates the server and you need to write your own resolvers, connect to database, ... Prisma on the other hand handle everything out of the box for you.
Re:Show HN: Generating GraphQL servers for Go by Blackstone4 on Sunday February 11, 2018 @09:40AM (#16352836)
Thanks. Yeah that's what I thought.

On Prisma, I have a graphql-yoga server which sits in front of Prisma. My server has its own schema and api and it handles auth, permissions and business logic

Re:Show HN: Generating GraphQL servers for Go by vektah on Sunday February 11, 2018 @09:37AM (#16352832)
Yeah, would be more for existing apps that already have a bunch of domain logic.