descriptor

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enumeration

type Enumeration struct {
	Name   *string
	Values []*string
}

type Field

type Field struct {
	Name         *string
	Type         *GraphQLType
	NonPrimitive bool
	Optional     bool
	IsList       bool
}

Field represents a field inside a an object type

func (*Field) GetType

func (f *Field) GetType(field *descriptorpb.FieldDescriptorProto)

GetType obtains the type of field

func (*Field) IsOptional

func (f *Field) IsOptional(field *descriptorpb.FieldDescriptorProto)

Check if the field is optional

func (*Field) IsRepeated

func (f *Field) IsRepeated(field *descriptorpb.FieldDescriptorProto)

Check if the field is repeated

func (*Field) IsRequired

func (f *Field) IsRequired(field *descriptorpb.FieldDescriptorProto)

Checks if the field is required

func (*Field) Print

func (p *Field) Print(msg ...string)

Prints a message

type GqlOutput

type GqlOutput struct {
	Type      string
	Array     bool
	Primitive bool
	Empty     bool
}

type GraphQLType

type GraphQLType string

GraphQLType represents a GraphQL type

const (
	Int     GraphQLType = "Int"
	Float   GraphQLType = "Float"
	Boolean GraphQLType = "Boolean"
	String  GraphQLType = "String"
	Object  GraphQLType = "type"
	Input   GraphQLType = "input"
	Enum    GraphQLType = "enum"
	Unknown GraphQLType = "Unknown"
)

func (*GraphQLType) String

func (s *GraphQLType) String() string

String returns the actual string value of the GraphQLType type

type InputType

type InputType struct {
	Fields []*Field
	Name   *string
}

type Mutation

type Mutation struct {
	Name    *string
	Target  uint32
	Input   *options.GqlInput
	Payload *string
	Skip    bool
}

Represents GraphQL Mutation type

type ObjectType

type ObjectType struct {
	Fields []*Field
	Name   *string
	Nested []*ObjectType
	Enums  []*Enumeration
}

type Query

type Query struct {
	Name    *string
	Target  uint32
	Input   *options.GqlInput
	Payload *string
	Skip    bool
}

Represents GraphQL Query type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL