3

Does a simple & working "Hello World!" GraphQL server code in Go exist?

There is a deficiency in tutorials concerning that topic, especially because graphql-go/graphql is currently a work-in-progress.

  • I made a simple starter making use of neelance/graphql-go. You could take reference to it : https://github.com/OscarYuen/go-graphql-starter – OsYYYY Feb 23 '18 at 11:10

2 Answers2

6

I've actually spent a bit of time this weekend creating a golang graphql server for a presentation upcoming this week, that has nothing to do with golang graphql. I don't know any golang, and never put together a server, I also threw in Neo4j, it's been an adventure, the hello world example is the following;

https://github.com/graphql-go/graphql/blob/master/examples/hello-world/main.go

In addition I used graphql-go/handler to create an endpoint;

https://github.com/graphql-go/handler

Finally added graphiql in order to check out my queries;

https://github.com/mnmtanish/go-graphiql

I started with getting the hello world example to be visible in go-graphiql, but using the handler to expose the schema.

Perspective
  • 642
  • 5
  • 12
4

The most stared project is https://github.com/graphql-go/graphql but it seems to be not actively developed.

I've been keeping an eye to this implementation that looks promising:https://github.com/neelance/graphql-go

a new repo that I still need to check: https://github.com/playlyfe/go-graphql

Ezequiel Moreno
  • 2,228
  • 22
  • 27