func (o *InputField) IsDefaultValueSet() bool {
	return reflect.ValueOf(o.DefaultValue).IsValid()
}
/*
IsDefaultValueSet helps to know if the default value was set or not
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)
}
func (s *Scalar) CoerceInput(i interface{}) (interface{}, error) {
	return s.CoerceInputFunc(i)
}
func (s *Scalar) String() string {
	return s.Name
}
type Enum struct {
	Name        string
	Description string
	Directives  TypeSystemDirectives
	Values      EnumValues
}
func (e *Enum) GetDescription() string {
	return e.Description
}
func (e *Enum) GetName() string {
	return e.Name
}
func (e *Enum) GetDirectives() []TypeSystemDirective {
	return e.Directives
}
func (e *Enum) GetKind() TypeKind {
	return EnumKind
}
func (e *Enum) GetValues() []*EnumValue {
	return e.Values
}
func (e *Enum) String() string {
	return e.Name
}
type EnumValues []*EnumValue
type EnumValue struct {
	Name        string
	Description string
	Directives  TypeSystemDirectives
	Value       interface{}
}
func (e EnumValue) GetDescription() string {
	return e.Description
}
func (e EnumValue) GetDirectives() []TypeSystemDirective {
	return e.Directives
}
func (e EnumValue) GetValue() interface{} {
	return e.Value
}
func (e EnumValue) IsDeprecated() bool {
	for _, d := range e.Directives {
		if _, ok := d.(*deprecated); ok {
			return true
		}
	}
	return false
}
type Object struct {
	Description string
	Name        string
	Implements  Interfaces
	Directives  TypeSystemDirectives
	Fields      Fields
}
func (o *Object) GetDescription() string {
	return o.Description
}
func (o *Object) GetName() string {
	return o.Name
}
func (o *Object) GetKind() TypeKind {
	return ObjectKind
}
func (o *Object) GetInterfaces() []*Interface {
	return o.Implements
}
func (o *Object) GetDirectives() []TypeSystemDirective {
	return o.Directives
}
func (o *Object) GetFields() map[string]*Field {
	return o.Fields
}
func (o *Object) AddField(name string, f *Field) {
	o.Fields[name] = f
}
func (o *Object) DoesImplement(i *Interface) bool {
	for _, in := range o.Implements {
		if in.Name == i.Name {
			return true
		}
	}
	return false
}
func (o *Object) String() string {
	return o.Name
}
type Interfaces []*Interface
type Interface struct {
	Description  string
	Name         string
	Directives   TypeSystemDirectives
	Fields       Fields
	TypeResolver TypeResolver
}
type TypeResolver func(context.Context, interface{}) *Object
func (i *Interface) GetDescription() string {
	return i.Description
}
func (i *Interface) GetName() string {
	return i.Name
}
func (i *Interface) GetKind() TypeKind {
	return InterfaceKind
}
func (i *Interface) GetDirectives() []TypeSystemDirective {
	return i.Directives
}
func (i *Interface) GetFields() map[string]*Field {
	return i.Fields
}
func (i *Interface) Resolve(ctx context.Context, v interface{}) *Object {
	return i.TypeResolver(ctx, v)
}
func (i *Interface) String() string {
	return i.Name
}
type Fields map[string]*Field
func (fs Fields) Add(name string, f *Field) {
	fs[name] = f
}
type Resolver func(Context) (interface{}, error)
type Field struct {
	Description string
	Arguments   Arguments
	Type        Type
	Directives  TypeSystemDirectives
	Resolver    Resolver
}
func (f *Field) GetDescription() string {
	return f.Description
}
func (f *Field) GetArguments() Arguments {
	return f.Arguments
}
func (f *Field) GetType() Type {
	return f.Type
}
func (f *Field) GetDirectives() []TypeSystemDirective {
	return f.Directives
}
func (f *Field) IsDeprecated() bool {
	for _, d := range f.Directives {
		if _, ok := d.(*deprecated); ok {
			return true
		}
	}
	return false
}
type Members []Type
type Union struct {
	Description  string
	Name         string
	Members      Members
	Directives   TypeSystemDirectives
	TypeResolver TypeResolver
}
func (u *Union) GetDescription() string {
	return u.Description
}
func (u *Union) GetName() string {
	return u.Name
}
func (u *Union) GetKind() TypeKind {
	return UnionKind
}
func (u *Union) GetMembers() []Type {
	return u.Members
}
func (u *Union) GetDirectives() []TypeSystemDirective {
	return u.Directives
}
func (u *Union) Resolve(ctx context.Context, v interface{}) *Object {
	return u.TypeResolver(ctx, v)
}
func (u *Union) String() string {
	return u.Name
}
type Arguments map[string]*Argument
func (args Arguments) String() (out string) {
	if args == nil {
		return
	}
	argsS := []string{}
	for name, arg := range args {
		if arg.Description != "" {
			out += `"` + arg.Description + `" `
		}
		out += name + `: `
		out += fmt.Sprint(arg.Type)
		if arg.IsDefaultValueSet() {
			out += fmt.Sprint(arg.DefaultValue)
		}
		argsS = append(argsS, out)
		out = ""
	}
	out = `(` + strings.Join(argsS, ", ") + `)`
	return
}
type Argument struct {
	Description  string
	Type         Type
	DefaultValue interface{}
}
func (a *Argument) IsDefaultValueSet() bool {
	return reflect.ValueOf(a.DefaultValue).IsValid()
}
type InputObject struct {
	Description string
	Name        string
	Directives  TypeSystemDirectives
	Fields      InputFields
}
func (o *InputObject) GetDescription() string {
	return o.Description
}
func (o *InputObject) GetName() string {
	return o.Name
}
func (o *InputObject) GetKind() TypeKind {
	return InputObjectKind
}
func (o *InputObject) GetDirectives() []TypeSystemDirective {
	return o.Directives
}
func (o *InputObject) GetFields() map[string]*InputField {
	return o.Fields
}
func (o *InputObject) String() string {
	return o.Name
}
type InputField struct {
	Description  string
	Type         Type
	DefaultValue interface{}
	Directives   TypeSystemDirectives
}