func getDefaultValue(input *ast.InputValueDefinition) interface{} {
	if value := input.DefaultValue; value != nil {
		return value.GetValue()
	}
	return nil
}
gets the default value or defaults to nil
package tools
import (
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"
	"github.com/graphql-go/graphql"
	"github.com/graphql-go/graphql/language/ast"
	"github.com/graphql-go/graphql/language/kinds"
)
func (c *registry) getFieldResolveFn(kind, typeName, fieldName string) graphql.FieldResolveFn {
	if r := c.getResolver(typeName); r != nil && kind == r.getKind() {
		switch kind {
		case kinds.ObjectDefinition:
			if fn, ok := r.(*ObjectResolver).Fields[fieldName]; ok {
				return fn.Resolve
			}
		case kinds.InterfaceDefinition:
			if fn, ok := r.(*InterfaceResolver).Fields[fieldName]; ok {
				return fn.Resolve
			}
		}
	}
	return graphql.DefaultResolveFn
}
func (c *registry) getFieldSubscribeFn(kind, typeName, fieldName string) graphql.FieldResolveFn {
	if r := c.getResolver(typeName); r != nil && kind == r.getKind() {
		switch kind {
		case kinds.ObjectDefinition:
			if fieldResolve, ok := r.(*ObjectResolver).Fields[fieldName]; ok {
				return fieldResolve.Subscribe
			}
		case kinds.InterfaceDefinition:
			if fieldResolve, ok := r.(*InterfaceResolver).Fields[fieldName]; ok {
				return fieldResolve.Subscribe
			}
		}
	}
	return nil
}
func (c *registry) buildComplexType(astType ast.Type) (graphql.Type, error) {
	switch kind := astType.GetKind(); kind {
	case kinds.List:
		t, err := c.buildComplexType(astType.(*ast.List).Type)
		if err != nil {
			return nil, err
		}
		return graphql.NewList(t), nil
	case kinds.NonNull:
		t, err := c.buildComplexType(astType.(*ast.NonNull).Type)
		if err != nil {
			return nil, err
		}
		return graphql.NewNonNull(t), nil
	case kinds.Named:
		t := astType.(*ast.Named)
		return c.getType(t.Name.Value)
	}
	return nil, fmt.Errorf("invalid kind")
}
func getDescription(node ast.DescribableNode) string {
	if desc := node.GetDescription(); desc != nil {
		return desc.Value
	}
	return ""
}