func TestOverlappingFieldsCanBeMerged(t *testing.T) {
	t.Run("valid", func(t *testing.T) {
		definitionBytes := RenderTemplate(5, OverlappingFieldsDefinition)
		operationBytes := RenderTemplate(5, OverlappingFieldsOperationValid)
		fmt.Println(string(operationBytes))
		definition := unsafeparser.ParseGraphqlDocumentBytes(definitionBytes)
		operation := unsafeparser.ParseGraphqlDocumentBytes(operationBytes)
		report := operationreport.Report{}
		normalizer := astnormalization.NewNormalizer(false, false)
		validator := DefaultOperationValidator()
		normalizer.NormalizeOperation(&operation, &definition, &report)
		if report.HasErrors() {
			panic(report.Error())
		}
		if validator.Validate(&operation, &definition, &report) != Valid {
			panic(report.Error())
		}
	})
	t.Run("invalid", func(t *testing.T) {
		definitionBytes := RenderTemplate(5, OverlappingFieldsDefinition)
		operationBytes := RenderTemplate(5, OverlappingFieldsOperationInvalid)
		fmt.Println(string(operationBytes))
		definition := unsafeparser.ParseGraphqlDocumentBytes(definitionBytes)
		operation := unsafeparser.ParseGraphqlDocumentBytes(operationBytes)
		report := operationreport.Report{}
		normalizer := astnormalization.NewNormalizer(false, false)
		validator := DefaultOperationValidator()
		normalizer.NormalizeOperation(&operation, &definition, &report)
		if report.HasErrors() {
			panic(report.Error())
		}
		if validator.Validate(&operation, &definition, &report) != Invalid {
			panic(report.Error())
		}
	})
}
inspired by: https://tech.xing.com/graphql-overlapping-fields-can-be-merged-fast-ea6e92e0a01
package astvalidation
import (
	"bytes"
	"fmt"
	"strconv"
	"testing"
	"text/template"
	"github.com/jensneuse/graphql-go-tools/internal/pkg/unsafeparser"
	"github.com/jensneuse/graphql-go-tools/pkg/astnormalization"
	"github.com/jensneuse/graphql-go-tools/pkg/operationreport"
)