gql

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: GPL-3.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PubSub = &SourceEvents{
	subscriptionEvents: make(map[OperationID]chan interface{}, 0),
	operationEvents:    make(map[OperationID]map[EventID]*Subscription, 0),
}

Functions

func Init

func Init(filesystem systemutils.FSInterface, folder string) *gql

func OnAuthorizate added in v0.12.0

func OnAuthorizate(authInfo AuthorizateInfo) (err definitionError.GQLError)

func OnIntrospection added in v0.12.0

func OnIntrospection() (err definitionError.GQLError)

Types

type Access added in v0.12.0

type Access []string

type AuthorizateInfo added in v0.12.0

type AuthorizateInfo struct {
	Operation string
	SrcType   TypeName
	DstType   TypeName
	Resolver  ResolverName
	SessionID string
}

type DefaultArguments

type DefaultArguments struct {
	Name    string
	IsArray bool
	Value   interface{}
	NonNull bool
	Kind    string
	Type    string
}

type Directives

type Directives map[string]resolvers.Directive

type EventID

type EventID string

type Grant added in v0.12.0

type Grant map[TypeName]map[TypeName]map[ResolverName]Access

type HttpRequest

type HttpRequest struct {
	Query         string                 `json:"query"`
	Variables     map[string]interface{} `json:"variables,omitempty"`
	OperationName string                 `json:"operationName,omitempty"`
}

type HttpResponse

type HttpResponse struct {
	Data   string `json:"data,omitempty"`
	Errors string `json:"errors,omitempty"`
}

type ObjectTypes

type ObjectTypes map[string]resolvers.ObjectTypeInterface

type OperationID

type OperationID string

type RequestID

type RequestID string

type ResolverName added in v0.12.0

type ResolverName string

type Response

type Response interface{}

type Scalars

type Scalars map[string]resolvers.Scalar

type SocketID

type SocketID string

type SourceEvents

type SourceEvents struct {
	// contains filtered or unexported fields
}

func (*SourceEvents) Publish

func (o *SourceEvents) Publish(operationID OperationID, value interface{})

type Subscription

type Subscription struct {
	// contains filtered or unexported fields
}

type SubscriptionClose

type SubscriptionClose struct{}

type TypeName added in v0.12.0

type TypeName string

type WebSocketRequest

type WebSocketRequest struct {
	Id      string      `json:"id"`
	Type    string      `json:"type"`
	Payload HttpRequest `json:"payload"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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