graphqlserver

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package graphqlserver implements a GraphQL mock server.

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
}

Server is the GraphQL mock server.

func New

func New(cfg *config.GraphQLConfig, store *state.Store, sc *scenarios.Store, log *logger.Logger) *Server

New creates a Server.

func (*Server) GetMocks

func (s *Server) GetMocks() []config.GraphQLMock

func (*Server) SetMocks

func (s *Server) SetMocks(mocks []config.GraphQLMock)

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start listens and serves GraphQL requests. Blocks until ctx is cancelled.

func (*Server) StatusInfo

func (s *Server) StatusInfo() map[string]interface{}

StatusInfo returns JSON-serialisable server info.

Jump to

Keyboard shortcuts

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