package fieldset
import "github.com/99designs/gqlgen/plugin/federation/fieldset"
Index ¶
- type Field
- func (f Field) FieldDefinition(schemaType *ast.Definition, schema *ast.Schema) *ast.FieldDefinition
- func (f Field) Join(str string) string
- func (f Field) JoinGo(str string) string
- func (f Field) LastIndex() int
- func (f Field) ToGo() string
- func (f Field) ToGoPrivate() string
- func (f Field) TypeReference(obj *codegen.Object, objects codegen.Objects) *codegen.Field
- type Set
Types ¶
type Field ¶
type Field []string
Field represents a single field in a FieldSet
func (Field) FieldDefinition ¶
func (f Field) FieldDefinition(schemaType *ast.Definition, schema *ast.Schema) *ast.FieldDefinition
FieldDefinition looks up a field in the type.
func (Field) Join ¶
Join concatenates the field parts with a string separator between. Useful in templates.
func (Field) JoinGo ¶
JoinGo concatenates the Go name of field parts with a string separator between. Useful in templates.
func (Field) LastIndex ¶
func (Field) ToGo ¶
ToGo converts a (possibly nested) field into a proper public Go name.
func (Field) ToGoPrivate ¶
ToGoPrivate converts a (possibly nested) field into a proper private Go name.
func (Field) TypeReference ¶
TypeReference looks up the type of a field.
type Set ¶
type Set []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.
func New ¶
New parses a FieldSet string into a TinyFieldSet.
Source Files ¶
- Version
- v0.17.73 (latest)
- Published
- May 2, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 6 days ago –
Tools for package owners.