// GetQuerySchema schema for query / get record
GetQuerySchema schema for query / get record
// GetQuerySchema schema for query / get record
func GetQuerySchema() graphql.ObjectConfig {
	queryFields := graphql.Fields{
		"books": &graphql.Field{
			Type:    graphql.NewList(types.BookType),
			Resolve: resolver.GetBooks,
		},
		"book": &graphql.Field{
			Type: types.BookType,
			Args: graphql.FieldConfigArgument{
				"id": &graphql.ArgumentConfig{
					Type: graphql.NewNonNull(graphql.Int),
				},
			},
			Resolve: resolver.GetBook,
		},
	}
	rootQuery := graphql.ObjectConfig{Name: "RootQuery", Fields: queryFields}
	return rootQuery
}
func GetQuerySchema ( ) graphql . ObjectConfig { queryFields := graphql . Fields { " " : & graphql . Field { Type : graphql . NewList ( types . BookType ) , Resolve : resolver . GetBooks , } , " " : & graphql . Field { Type : types . BookType , Args : graphql . FieldConfigArgument { " " : & graphql . ArgumentConfig { Type : graphql . NewNonNull ( graphql . Int ) , } , } , Resolve : resolver . GetBook , } , } rootQuery := graphql . ObjectConfig { Name : " " , Fields : queryFields } return rootQuery }
GetQuerySchema schema for query / get record
GetQuerySchema schema for query / get record