subgraphs

package
v0.0.0-...-d5d118b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: Apache-2.0 Imports: 35 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EmployeesDefaultDemoURL    = "http://localhost:4001/graphql"
	FamilyDefaultDemoURL       = "http://localhost:4002/graphql"
	HobbiesDefaultDemoURL      = "http://localhost:4003/graphql"
	ProductsDefaultDemoURL     = "http://localhost:4004/graphql"
	Test1DefaultDemoURL        = "http://localhost:4006/graphql"
	AvailabilityDefaultDemoURL = "http://localhost:4007/graphql"
	MoodDefaultDemoURL         = "http://localhost:4008/graphql"
	CountriesDefaultDemoURL    = "http://localhost:4009/graphql"
	ProductsFgDefaultDemoURL   = "http://localhost:4010/graphql"
)

Variables

This section is empty.

Functions

func AvailabilityHandler

func AvailabilityHandler(opts *SubgraphOptions) http.Handler

func CountriesHandler

func CountriesHandler(opts *SubgraphOptions) http.Handler

func EmployeesHandler

func EmployeesHandler(opts *SubgraphOptions) http.Handler

func FamilyHandler

func FamilyHandler(opts *SubgraphOptions) http.Handler

func HobbiesHandler

func HobbiesHandler(opts *SubgraphOptions) http.Handler

func MoodHandler

func MoodHandler(opts *SubgraphOptions) http.Handler

func NewDemoServer

func NewDemoServer(schema graphql.ExecutableSchema) *handler.Server

func ProductsFGHandler

func ProductsFGHandler(opts *SubgraphOptions) http.Handler

func ProductsHandler

func ProductsHandler(opts *SubgraphOptions) http.Handler

func Test1Handler

func Test1Handler(opts *SubgraphOptions) http.Handler

Types

type Config

type Config struct {
	Ports       Ports
	EnableDebug bool
}

type Ports

type Ports struct {
	Employees    int
	Family       int
	Hobbies      int
	Products     int
	ProductsFG   int
	Test1        int
	Availability int
	Mood         int
	Countries    int
}

func (*Ports) AsArray

func (p *Ports) AsArray() []int

type SubgraphOptions

type SubgraphOptions struct {
	NatsPubSubByProviderID map[string]pubsub_datasource.NatsPubSub
}

type Subgraphs

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

func New

func New(ctx context.Context, config *Config) (*Subgraphs, error)

func (*Subgraphs) ListenAndServe

func (s *Subgraphs) ListenAndServe(ctx context.Context) error

func (*Subgraphs) Ports

func (s *Subgraphs) Ports() Ports

func (*Subgraphs) Shutdown

func (s *Subgraphs) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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