generated

package
v0.0.0-...-a771f44 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 13 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 {
	Contact struct {
		CreatedAt func(childComplexity int) int
		Email     func(childComplexity int) int
		FirstName func(childComplexity int) int
		ID        func(childComplexity int) int
		LastName  func(childComplexity int) int
		Phone     func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
	}

	DeleteResponse struct {
		RowsAffected func(childComplexity int) int
	}

	Mutation struct {
		CreateContact func(childComplexity int, input model.NewContact) int
		DeleteContact func(childComplexity int, id int) int
		UpdateContact func(childComplexity int, input model.UpdateContact) int
	}

	Query struct {
		Contacts func(childComplexity int) int
	}
}

type Config

type Config struct {
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	CreateContact(ctx context.Context, input model.NewContact) (*model.Contact, error)
	UpdateContact(ctx context.Context, input model.UpdateContact) (*model.Contact, error)
	DeleteContact(ctx context.Context, id int) (*model.DeleteResponse, error)
}

type QueryResolver

type QueryResolver interface {
	Contacts(ctx context.Context) ([]*model.Contact, error)
}

type ResolverRoot

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

Jump to

Keyboard shortcuts

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