Hacker News new | ask | show | jobs
by StreamBright 3352 days ago
Is there any great libraries to implement the backend for GraphQL? I think the benefits of using GraphQL on the frontend are pretty obvious, however last time I checked I had trouble of finding good documentation or implementation on how to serve GraphQL requests from the backend point of view.
8 comments

Great question! There are great libraries like Create-GraphQL (https://github.com/lucasbento/create-graphql) that can help you scaffold an app on the server side pretty quickly, and it's fairly un-opinionated. That one in particular works with Mongo, but I believe they're rolling out support for other data sources as well soon.

In addition, if you're looking for a hi-fidelity way of building apps without having to worry about the server-side, Scaphold.io (https://scaphold.io) is a GraphQL backend as a service that can help. I work full-time here, and we help you get from zero to GraphQL in a matter of minutes.

And with this you have two options:

1) If you want to use the service, by all means :)

2) We're built to the open standard / Relay spec, meaning that if you want to create an app to learn about how the API is structured, that can help as well. Here's more of a primer on how our API is built and works anywhere (https://docs.scaphold.io/coredata/schema/).

Feel free to reach out if you have any questions on our Slack (http://slack.scaphold.io)!

Absinthe works great for me: http://absinthe-graphql.org/
Graphene is nice for Python. Supports Relay stuff too (I've never used these features, though).

http://graphene-python.org/

There's a reasonable set of language specific libraries listed here: http://graphql.org/code/

Also a common pattern is wrapping an existing REST API with a GraphQL proxy: https://github.com/graphql/graphql-js

Sangria over on the Scala side is really nice. http://sangria-graphql.org/
For frontend developers who want to get started quickly, you can also use a hosted GraphQL service such as Graphcool: https://www.graph.cool

This approach abstracts all of the implementation details away and lets you focus on your GraphQL schema + implementing your business logic.

Disclaimer: I'm one of the founders of Graphcool. Happy to answer any kind of questions!

There are many great libraries for backends available in many different languages. Some resources to find one:

http://graphql.org/code/

https://github.com/chentsulin/awesome-graphql

If you're willing to commit to Postgres, this package makes turning on a GraphQL API as simple as writing a couple lines of middleware: https://github.com/postgraphql/postgraphql