github.com/weaviate/weaviate@v1.24.6/modules/sum-transformers/additional/summary/summary_graphql_field.go (about)

     1  //                           _       _
     2  // __      _____  __ ___   ___  __ _| |_ ___
     3  // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
     4  //  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
     5  //   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
     6  //
     7  //  Copyright © 2016 - 2024 Weaviate B.V. All rights reserved.
     8  //
     9  //  CONTACT: hello@weaviate.io
    10  //
    11  
    12  package summary
    13  
    14  import (
    15  	"fmt"
    16  
    17  	"github.com/tailor-inc/graphql"
    18  )
    19  
    20  func (p *SummaryProvider) additionalSummaryField(classname string) *graphql.Field {
    21  	return &graphql.Field{
    22  		Args: graphql.FieldConfigArgument{
    23  			"properties": &graphql.ArgumentConfig{
    24  				Description:  "Properties which contains text",
    25  				Type:         graphql.NewList(graphql.String),
    26  				DefaultValue: nil,
    27  			},
    28  		},
    29  		Type: graphql.NewList(graphql.NewObject(graphql.ObjectConfig{
    30  			Name: fmt.Sprintf("%sAdditionalSummary", classname),
    31  			Fields: graphql.Fields{
    32  				"property": &graphql.Field{Type: graphql.String},
    33  				"result":   &graphql.Field{Type: graphql.String},
    34  			},
    35  		})),
    36  	}
    37  }