5 ms·
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 int
by Blackstone4 9y ago
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?
- Blackstone4 9y agoI'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.
- sebastian 9y agoCheck out https://dgraph.io/ 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.
- Blackstone4 9y agoLooks interesting. Shame the syntax is GraphQL-like but not pure GraphQL.
- Blackstone4 9y agoLooks like GraphQL compatibility is on the roadmap for 2018 https://github.com/dgraph-io/dgraph/issues/1966 https://github.com/dgraph-io/dgraph/issues/1966
- vektah 9y agoI 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 :)
- thangngoc89 9y agoThis 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.
- vektah 9y agoYeah, would be more for existing apps that already have a bunch of domain logic.
- Blackstone4 9y agoThanks. 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
- vektah 9y agoYeah, 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).