func (s *Scalar) CoerceInput(i interface{}) (interface{}, error) {
	return s.CoerceInputFunc(i)
}
CoerceInput coerces the input value to the type used in execution
package gql
import (
	"context"
	"fmt"
	"reflect"
	"strings"
	"github.com/rigglo/gql/pkg/language/ast"
)
type Schema struct {
	Query           *Object
	Mutation        *Object
	Subscription    *Object
	Directives      TypeSystemDirectives
	AdditionalTypes []Type
	RootValue       interface{}
}
func (s Schema) SDL() string {
	b := newSDLBuilder(&s)
	return b.Build()
}
type TypeKind uint
const (
	ScalarKind TypeKind = iota
	ObjectKind
	InterfaceKind
	UnionKind
	EnumKind
	InputObjectKind
	NonNullKind
	ListKind
)
type Type interface {
	GetName() string
	GetDescription() string
	GetKind() TypeKind
	String() string
}
func isInputType(t Type) bool {
	if t.GetKind() == ListKind || t.GetKind() == NonNullKind {
		return isInputType(t.(WrappingType).Unwrap())
	}
	if t.GetKind() == ScalarKind || t.GetKind() == EnumKind || t.GetKind() == InputObjectKind {
		return true
	}
	return false
}
func isOutputType(t Type) bool {
	if t.GetKind() == ListKind || t.GetKind() == NonNullKind {
		return isOutputType(t.(WrappingType).Unwrap())
	}
	if t.GetKind() == ScalarKind || t.GetKind() == ObjectKind || t.GetKind() == InterfaceKind || t.GetKind() == UnionKind || t.GetKind() == EnumKind {
		return true
	}
	return false
}
type List struct {
	Name        string
	Description string
	Wrapped     Type
}
func NewList(t Type) Type {
	return &List{
		Name:        "List",
		Description: "Built-in 'List' type",
		Wrapped:     t,
	}
}
func (l *List) GetName() string {
	return l.Name
}
func (l *List) GetDescription() string {
	return l.Description
}
func (l *List) GetKind() TypeKind {
	return ListKind
}
func (l *List) Unwrap() Type {
	return l.Wrapped
}
func (l *List) String() string {
	return fmt.Sprintf("[%s]", l.Wrapped.String())
}
type NonNull struct {
	Name        string
	Description string
	Wrapped     Type
}
func NewNonNull(t Type) Type {
	return &NonNull{
		Name:        "NonNull",
		Description: "Built-in 'NonNull' type",
		Wrapped:     t,
	}
}
func (l *NonNull) GetName() string {
	return l.Name
}
func (l *NonNull) GetDescription() string {
	return l.Description
}
func (l *NonNull) GetKind() TypeKind {
	return NonNullKind
}
func (l *NonNull) Unwrap() Type {
	return l.Wrapped
}
func (l *NonNull) String() string {
	return fmt.Sprintf("%s!", l.Wrapped.String())
}
type CoerceResultFunc func(interface{}) (interface{}, error)
type CoerceInputFunc func(interface{}) (interface{}, error)
type ScalarAstValueValidator func(ast.Value) error
type Scalar struct {
	Name             string
	Description      string
	Directives       TypeSystemDirectives
	CoerceResultFunc CoerceResultFunc
	CoerceInputFunc  CoerceInputFunc
	AstValidator     ScalarAstValueValidator
}
func (s *Scalar) GetName() string {
	return s.Name
}
func (s *Scalar) GetDescription() string {
	return s.Description
}
func (s *Scalar) GetKind() TypeKind {
	return ScalarKind
}
func (s *Scalar) GetDirectives() []TypeSystemDirective {
	return s.Directives
}
func (s *Scalar) CoerceResult(i interface{}) (interface{}, error) {
	return s.CoerceResultFunc(i)
}