srvgql

package
v0.0.0-...-a6f2505 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Error struct {
		Code    func(childComplexity int) int
		Message func(childComplexity int) int
	}

	Message struct {
		Data  func(childComplexity int) int
		Error func(childComplexity int) int
	}

	Query struct {
		Hello func(childComplexity int, name string) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type QueryResolver

type QueryResolver interface {
	Hello(ctx context.Context, name string) (*models.Message, error)
}

type Resolver

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

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

type ResolverRoot

type ResolverRoot interface {
	Query() QueryResolver
}

type Server

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

func New

func New(port int, service Service) (*Server, error)

func (*Server) HealthCheck

func (s *Server) HealthCheck() error

func (*Server) Run

func (s *Server) Run(ctx context.Context, wg *sync.WaitGroup)

type Service

type Service interface {
	Hello(name string) (*models.HelloMessage, error)
}

Directories

Path Synopsis
Package mock_srvgql is a generated GoMock package.
Package mock_srvgql is a generated GoMock package.

Jump to

Keyboard shortcuts

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