We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70ee617 commit ce8e677Copy full SHA for ce8e677
graphiql.go
@@ -38,12 +38,17 @@ func renderGraphiQL(w http.ResponseWriter, params graphql.Params) {
38
}
39
40
// Create result string
41
- result, err := json.MarshalIndent(graphql.Do(params), "", " ")
42
- if err != nil {
43
- http.Error(w, err.Error(), http.StatusInternalServerError)
44
- return
+ var resString string
+ if params.RequestString == "" {
+ resString = ""
+ } else {
45
+ result, err := json.MarshalIndent(graphql.Do(params), "", " ")
46
+ if err != nil {
47
+ http.Error(w, err.Error(), http.StatusInternalServerError)
48
+ return
49
+ }
50
+ resString = string(result)
51
- resString := string(result)
52
53
p := graphiqlPage{
54
GraphiqlVersion: graphiqlVersion,
0 commit comments