文档注释
This commit is contained in:
		@@ -29,7 +29,8 @@ func NewSchema(config Config) (graphql.Schema, error) {
 | 
			
		||||
 | 
			
		||||
	// 文章的可选字段
 | 
			
		||||
	article := graphql.NewObject(graphql.ObjectConfig{
 | 
			
		||||
		Name: "Article",
 | 
			
		||||
		Name:        "Article",
 | 
			
		||||
		Description: "文章信息",
 | 
			
		||||
		Fields: graphql.Fields{
 | 
			
		||||
			"id":          &graphql.Field{Type: graphql.Int},
 | 
			
		||||
			"title":       &graphql.Field{Type: graphql.String},
 | 
			
		||||
@@ -41,7 +42,8 @@ func NewSchema(config Config) (graphql.Schema, error) {
 | 
			
		||||
 | 
			
		||||
	// 用户的可选字段
 | 
			
		||||
	user := graphql.NewObject(graphql.ObjectConfig{
 | 
			
		||||
		Name: "User",
 | 
			
		||||
		Name:        "User",
 | 
			
		||||
		Description: "用户信息",
 | 
			
		||||
		Fields: graphql.Fields{
 | 
			
		||||
			"id":          &graphql.Field{Type: graphql.Int},
 | 
			
		||||
			"user_name":   &graphql.Field{Type: graphql.String},
 | 
			
		||||
@@ -55,7 +57,8 @@ func NewSchema(config Config) (graphql.Schema, error) {
 | 
			
		||||
 | 
			
		||||
	// 图像中的文字提取
 | 
			
		||||
	text := graphql.NewObject(graphql.ObjectConfig{
 | 
			
		||||
		Name: "Text",
 | 
			
		||||
		Name:        "Text",
 | 
			
		||||
		Description: "图像中的文字提取",
 | 
			
		||||
		Fields: graphql.Fields{
 | 
			
		||||
			"text":       &graphql.Field{Type: graphql.String},
 | 
			
		||||
			"confidence": &graphql.Field{Type: graphql.Float},
 | 
			
		||||
@@ -67,7 +70,8 @@ func NewSchema(config Config) (graphql.Schema, error) {
 | 
			
		||||
 | 
			
		||||
	// 图像的可选字段
 | 
			
		||||
	image := graphql.NewObject(graphql.ObjectConfig{
 | 
			
		||||
		Name: "Image",
 | 
			
		||||
		Name:        "Image",
 | 
			
		||||
		Description: "图像信息",
 | 
			
		||||
		Fields: graphql.Fields{
 | 
			
		||||
			"id":                      &graphql.Field{Type: graphql.Int},
 | 
			
		||||
			"width":                   &graphql.Field{Type: graphql.Int},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user