func (e *Executor) writeQuoted(data []byte) {
	e.write(literal.QUOTE)
	e.write(data)
	e.write(literal.QUOTE)
}
writeQuoted quotes and writes the data to the out io.Writer if there is no error previously captured
package execution
import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"io"
	"strconv"
	"strings"
	"sync"
	"unicode/utf8"
	"github.com/buger/jsonparser"
	"github.com/cespare/xxhash"
	byte_template "github.com/jensneuse/byte-template"
	"github.com/tidwall/gjson"
	"github.com/jensneuse/graphql-go-tools/internal/pkg/unsafebytes"
	"github.com/jensneuse/graphql-go-tools/pkg/ast"
	"github.com/jensneuse/graphql-go-tools/pkg/execution/datasource"
	"github.com/jensneuse/graphql-go-tools/pkg/lexer/literal"
	"github.com/jensneuse/graphql-go-tools/pkg/lexer/runes"
)
type Executor struct {
	context            Context
	out                io.Writer
	err                error
	buffers            LockableBufferMap
	escapeBuf          [48]byte
	templateDirectives []byte_template.DirectiveDefinition
}
type LockableBufferMap struct {
	sync.Mutex
	Buffers map[uint64]*bytes.Buffer
}
func NewExecutor(templateDirectives []byte_template.DirectiveDefinition) *Executor {
	return &Executor{
		buffers: LockableBufferMap{
			Buffers: map[uint64]*bytes.Buffer{},
		},
		templateDirectives: templateDirectives,
	}
}
func (e *Executor) Execute(ctx Context, node RootNode, w io.Writer) error {
	e.context = ctx
	e.out = w
	e.err = nil
	var path string
	switch node.OperationType() {
	case ast.OperationTypeQuery:
		path = "query"
	case ast.OperationTypeMutation:
		path = "mutation"
	case ast.OperationTypeSubscription:
		path = "subscription"
	}
	e.resolveNode(node, nil, path, nil, true)
	return e.err
}
func (e *Executor) write(data []byte) {
	if e.err != nil {
		return
	}
	_, e.err = e.out.Write(data)
}