func ExampleValue_GoValue_gocmp() {
	ctx := context.Background()
	server := newServer()
	response := server.Execute(ctx, graphql.Request{
		Query: `{ genericGreeting, greet(subject: "World") }`,
	})
	if len(response.Errors) > 0 {
		log.Fatal(response.Errors)
	}
	got := response.Data.GoValue()
	want := map[string]interface{}{
		"genericGreeting": "Hiya!",
		"greet":           "Hello, World!",
	}
	if diff := cmp.Diff(want, got); diff == "" {
		fmt.Println("Got the expected greeting")
	} else {
		fmt.Printf("data (-want +got):\n%s", diff)
	}
}
GoValue is often useful for testing with go-cmp.
package graphql_test
import (
	"context"
	"encoding/json"
	"fmt"
	"log"
	"github.com/google/go-cmp/cmp"
	"zombiezen.com/go/graphql-server/graphql"
)
func Example_json() {
	server := newServer()
	var request graphql.Request
	err := json.Unmarshal([]byte(`{
		"query": "{ genericGreeting }"
	}`), &request)
	if err != nil {
		log.Fatal(err)
	}
	response := server.Execute(context.Background(), request)
	responseJSON, err := json.MarshalIndent(response, "", "  ")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(string(responseJSON))
}
func ExampleValidatedQuery() {
	server := newServer()
	query, errs := server.Schema().Validate(`{ genericGreeting }`)
	if len(errs) > 0 {
		log.Fatal(errs)
	}
	response := server.Execute(context.Background(), graphql.Request{
		ValidatedQuery: query,
	})
	if len(response.Errors) > 0 {
		log.Fatal(response.Errors)
	}
	fmt.Println(response.Data.ValueFor("genericGreeting").Scalar())
}