Using two handlers for a GraphQL project; handle query with the second one if the first one is not capable of
问题 I'm trying to use both SuperGraph as-a-library and GqlGen. So I have two handlers: the first one is SuperGraph ; this checks that it can carry out the operation the second one is GqlGen ; this checks that it can carry out the operation if the first one can't The code I'm using is this: type reqBody struct { Query string `json:"query"` } func Handler(sg *core.SuperGraph, next http.Handler) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { bodyBytes, _ := ioutil.ReadAll(r