Skip to content

Commit

Permalink
Adding ContentType header to GET request responses
Browse files Browse the repository at this point in the history
  • Loading branch information
ddouglas committed Jun 14, 2020
1 parent f5de473 commit 4a62f01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions graphql/handler/transport/http_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ func (h GET) Supports(r *http.Request) bool {
}

func (h GET) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor) {
w.Header().Set("Content-Type", "application/json")

raw := &graphql.RawParams{
Query: r.URL.Query().Get("query"),
OperationName: r.URL.Query().Get("operationName"),
Expand Down

0 comments on commit 4a62f01

Please sign in to comment.