Field represents a single field in a FieldSet
type Field []string
func (f Field) FieldDefinition(schemaType *ast.Definition, schema *ast.Schema) *ast.FieldDefinition
FieldDefinition looks up a field in the type.
func (f Field) Join(str string) string
Join concatenates the field parts with a string separator between. Useful in templates.
func (f Field) JoinGo(str string) string
JoinGo concatenates the Go name of field parts with a string separator between. Useful in templates.
func (f Field) LastIndex() int
func (f Field) ToGo() string
ToGo converts a (possibly nested) field into a proper public Go name.
func (f Field) ToGoPrivate() string
ToGoPrivate converts a (possibly nested) field into a proper private Go name.
func (f Field) TypeReference(obj *codegen.Object, objects codegen.Objects) *codegen.Field
TypeReference looks up the type of a field.
Set represents a FieldSet that is used in federation directives @key and @requires. Would be happier to reuse FieldSet parsing from gqlparser, but this suits for now.
type Set []Field
func New(raw string, prefix []string) Set
New parses a FieldSet string into a TinyFieldSet.