Refactor GraphQL schema and format JSON output
This commit is contained in:
		@@ -197,7 +197,8 @@ func main() {
 | 
			
		||||
			http.Error(w, result.Errors[0].Error(), 500)
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
		rJSON, _ := json.Marshal(result)
 | 
			
		||||
		// 格式化输出
 | 
			
		||||
		rJSON, _ := json.MarshalIndent(result, "", "  ")
 | 
			
		||||
		fmt.Printf("%s \n", rJSON)
 | 
			
		||||
		w.Write(rJSON)
 | 
			
		||||
	})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user