NewServer returns a new IServeGraphQL that can serve the given resolvers
()
| 58 | |
| 59 | // NewServer returns a new IServeGraphQL that can serve the given resolvers |
| 60 | func NewServer() IServeGraphQL { |
| 61 | gh := &graphqlHandler{ |
| 62 | resolver: make(map[uint64]*resolve.RequestResolver), |
| 63 | poller: make(map[uint64]*subscription.Poller), |
| 64 | } |
| 65 | gh.handler = recoveryHandler(commonHeaders(gh.Handler())) |
| 66 | return gh |
| 67 | } |
| 68 | |
| 69 | func (gh *graphqlHandler) Set(ns uint64, schemaEpoch *uint64, resolver *resolve.RequestResolver) { |
| 70 | gh.resolverMux.Lock() |
no test coverage detected