descriptor

package
v0.0.0-...-2f50b3c Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 4 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
	TypeName *string
	Optional *bool
	Repeated *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 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
	Input   *InputType
	Payload *ObjectType
	Target  *string
}

Represents GraphQL Mutation type

type ObjectType

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

type Query

type Query struct {
	Name    *string
	Input   *InputType
	Payload *ObjectType
	Target  *string
}

Represents GraphQL Query type

Jump to

Keyboard shortcuts

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