项目作者: rodrigobotelho

项目描述 :
Project to use go-kit with graph-gophers/graphql
高级语言: Go
项目地址: git://github.com/rodrigobotelho/graphql-kit.git
创建时间: 2018-10-17T18:23:58Z
项目社区:https://github.com/rodrigobotelho/graphql-kit

开源协议:Other

下载


Project to use go-kit with graph-gophers/graphql-go

This project has the objective to use the facilities of go-kit
together with the facilities of graph-gophers/graphql-go.

It creates an api to add services as graphql, logging, instrumenting
and authenticating.

Go kit
graphql-go

Example of utilization

  1. h := graphql-kit.Handlers{}
  2. h.AddGraphqlService(schema, resolver)
  3. h.AddLoggingService(logger)
  4. h.AddInstrumentingService(namespace, moduleName)
  5. h.AddAuthenticationService(secret, method, claims)
  6. http.Handle("/graphql", h.Handler())

Another option

  1. h := graphql-kit.Handlers{}
  2. h.AddFullGraphqlService(
  3. schema, resolver,
  4. logger,
  5. namespace, moduleName,
  6. secret, method, claims
  7. )
  8. http.Handle("/graphql", h.Handler())