Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into feature/graphiql
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Fuhrimann committed Aug 26, 2017
2 parents ac89766 + 43051ba commit 24733ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ func (h *Handler) ContextHandler(ctx context.Context, w http.ResponseWriter, r *
}
}

// use proper JSON Header
w.Header().Add("Content-Type", "application/json")

if h.pretty {
w.WriteHeader(http.StatusOK)
buff, _ := json.MarshalIndent(result, "", "\t")
Expand Down
2 changes: 1 addition & 1 deletion handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"strings"
"testing"

"context"
"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/testutil"
"github.com/graphql-go/handler"
"context"
)

func decodeResponse(t *testing.T, recorder *httptest.ResponseRecorder) *graphql.Result {
Expand Down

0 comments on commit 24733ec

Please sign in to comment.