natsproto

package module
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(subject string, conn *nats.Conn) graphqlclientgen.ProtoClient

NewClient creates a new Client for graphqlclientgen clients

Types

type Client

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

func (Client) Do

func (client Client) Do(ctx context.Context, in graphqlclientgen.Body, out any) error

Do performs nats request towards a GraphQL api

type Server

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

func NewDefaultServer

func NewDefaultServer(es graphql.ExecutableSchema) *Server

NewDefaultServer creates a new Server with sensible defaults for nats subscription

func NewServer

func NewServer(es graphql.ExecutableSchema) *Server

NewServer creates a new Server for nats subscription

func (*Server) AddTransport

func (server *Server) AddTransport(transport graphql.Transport)

func (*Server) AroundFields

func (server *Server) AroundFields(f graphql.FieldMiddleware)

AroundFields is a convenience method for creating an extension that only implements field middleware

func (*Server) AroundOperations

func (server *Server) AroundOperations(f graphql.OperationMiddleware)

AroundOperations is a convenience method for creating an extension that only implements operation middleware

func (*Server) AroundResponses

func (server *Server) AroundResponses(f graphql.ResponseMiddleware)

AroundResponses is a convenience method for creating an extension that only implements response middleware

func (*Server) AroundRootFields

func (server *Server) AroundRootFields(f graphql.RootFieldMiddleware)

AroundRootFields is a convenience method for creating an extension that only implements field middleware

func (*Server) HandleFunc

func (server *Server) HandleFunc(msg *nats.Msg)

HandleFunc handler for nats.Subscribe

func (*Server) SetErrorPresenter

func (server *Server) SetErrorPresenter(f graphql.ErrorPresenterFunc)

func (*Server) SetParserTokenLimit

func (server *Server) SetParserTokenLimit(limit int)

func (*Server) SetQueryCache

func (server *Server) SetQueryCache(cache graphql.Cache[*ast.QueryDocument])

func (*Server) SetRecoverFunc

func (server *Server) SetRecoverFunc(f graphql.RecoverFunc)

func (*Server) Use

func (server *Server) Use(extension graphql.HandlerExtension)

Jump to

Keyboard shortcuts

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