gqlgenx

package module
v0.0.0-...-f9f6938 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

README

gqlgenx

gqlgen Extension

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(es graphql.ExecutableSchema, opt ServerOption) (*Server, error)

func (Server) Option

func (s Server) Option() ServerOption

func (Server) Serve

func (s Server) Serve() error

type ServerOption

type ServerOption struct {
	Addr          string `validate:"required" default:":8080"`
	Endpoint      string `validate:"required" default:"/graphql"`
	GraphiQL      *bool  `validate:"required" default:"true"`
	Playground    *bool  `validate:"required" default:"false"`
	Voyager       *bool  `validate:"required" default:"true"`
	Introspection *bool  `validate:"required" default:"true"`
	CORS          *struct {
		AllowedOrigins   []string
		AllowCredentials bool `default:"true"`
	}
	HealthCheck struct {
		Path string `validate:"required" default:"/health_check"`
	}
}

func (ServerOption) BasePath

func (opt ServerOption) BasePath() string

func (ServerOption) FullEndpoint

func (opt ServerOption) FullEndpoint() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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