diff --git a/graphql/handler/transport/http_post.go b/graphql/handler/transport/http_post.go index 085f60a910f..985f8db2941 100644 --- a/graphql/handler/transport/http_post.go +++ b/graphql/handler/transport/http_post.go @@ -27,10 +27,6 @@ func (h POST) Supports(r *http.Request) bool { return false } - if strings.Contains(r.Header.Get("Accept"), "text/event-stream") { - return false - } - mediaType, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) if err != nil { return false diff --git a/graphql/handler/transport/http_post_test.go b/graphql/handler/transport/http_post_test.go index 28095d856bc..90ee9262608 100644 --- a/graphql/handler/transport/http_post_test.go +++ b/graphql/handler/transport/http_post_test.go @@ -109,8 +109,8 @@ func TestPOST(t *testing.T) { } resp := doReq(h, "POST", "/graphql", `{"query":"{ name }"}`) - assert.Equal(t, http.StatusBadRequest, resp.Code, resp.Body.String()) - assert.Equal(t, `{"errors":[{"message":"transport not supported"}],"data":null}`, resp.Body.String()) + assert.Equal(t, http.StatusOK, resp.Code, resp.Body.String()) + assert.Equal(t, `{"data":{"name":"test"}}`, resp.Body.String()) }) }