generated

package
v0.0.0-...-e3c2de5 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownType  = errors.New("unknown type")
	ErrTypeNotFound = errors.New("type not found")
)

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Contact struct {
		Active       func(childComplexity int) int
		ContactType  func(childComplexity int) int
		ContactValue func(childComplexity int) int
		Flavour      func(childComplexity int) int
		ID           func(childComplexity int) int
		UserID       func(childComplexity int) int
	}

	Mutation struct {
		SendOtp func(childComplexity int, phoneNumber string, flavour enums.Flavour) int
	}

	Query struct {
		SearchUser func(childComplexity int, searchTerm string) int
		// contains filtered or unexported fields
	}

	User struct {
		Active      func(childComplexity int) int
		FirstName   func(childComplexity int) int
		Flavour     func(childComplexity int) int
		ID          func(childComplexity int) int
		LastName    func(childComplexity int) int
		MiddleName  func(childComplexity int) int
		UserContact func(childComplexity int) int
		UserName    func(childComplexity int) int
		UserType    func(childComplexity int) int
	}
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	SendOtp(ctx context.Context, phoneNumber string, flavour enums.Flavour) (string, error)
}

type QueryResolver

type QueryResolver interface {
	SearchUser(ctx context.Context, searchTerm string) ([]*domain.User, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
	User() UserResolver
}

type UserResolver

type UserResolver interface {
	MiddleName(ctx context.Context, obj *domain.User) (string, error)

	Flavour(ctx context.Context, obj *domain.User) (enums.Flavour, error)
}

Jump to

Keyboard shortcuts

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