gql

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: GPL-3.0 Imports: 24 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 GenerateInit

func GenerateInit(serverName string, path string) *gql

func Init

func Init(serverName string, embedFS embed.FS, folder string) *gql

Types

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 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 []definitionError.GQLError `json:"errors,omitempty"`
}

type ObjectTypes

type ObjectTypes map[string]resolvers.ObjectTypeInterface

type OperationID

type OperationID string

type RequestID

type RequestID 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 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