generated

package
v0.0.0-...-be20ed5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 13 Imported by: 5

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 {
	Droid struct {
		AppearsIn         func(childComplexity int) int
		Friends           func(childComplexity int) int
		FriendsConnection func(childComplexity int, first *int, after *string) int
		ID                func(childComplexity int) int
		Name              func(childComplexity int) int
		PrimaryFunction   func(childComplexity int) int
	}

	FriendsConnection struct {
		Edges      func(childComplexity int) int
		Friends    func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	FriendsEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	Human struct {
		AppearsIn         func(childComplexity int) int
		Friends           func(childComplexity int) int
		FriendsConnection func(childComplexity int, first *int, after *string) int
		Height            func(childComplexity int, unit models.LengthUnit) int
		ID                func(childComplexity int) int
		Mass              func(childComplexity int) int
		Mutation          func(childComplexity int) int
		Name              func(childComplexity int) int
		Query             func(childComplexity int) int
		Starships         func(childComplexity int) int
	}

	Mutation struct {
		CreateReview func(childComplexity int, episode models.Episode, review models.Review) int
	}

	PageInfo struct {
		EndCursor   func(childComplexity int) int
		HasNextPage func(childComplexity int) int
		StartCursor func(childComplexity int) int
	}

	Query struct {
		Character func(childComplexity int, id string) int
		Droid     func(childComplexity int, id string) int
		Hero      func(childComplexity int, episode *models.Episode) int
		Human     func(childComplexity int, id string) int
		Reviews   func(childComplexity int, episode models.Episode, since *time.Time) int
		Search    func(childComplexity int, text string) int
		Starship  func(childComplexity int, id string) int
	}

	Review struct {
		Commentary func(childComplexity int) int
		Stars      func(childComplexity int) int
		Time       func(childComplexity int) int
	}

	Starship struct {
		History func(childComplexity int) int
		ID      func(childComplexity int) int
		Length  func(childComplexity int, unit *models.LengthUnit) int
		Name    func(childComplexity int) int
	}
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type DirectiveRoot

type DirectiveRoot struct {
}

type DroidResolver

type DroidResolver interface {
	Friends(ctx context.Context, obj *models.Droid) ([]models.Character, error)
	FriendsConnection(ctx context.Context, obj *models.Droid, first *int, after *string) (*models.FriendsConnection, error)
}

type FriendsConnectionResolver

type FriendsConnectionResolver interface {
	Edges(ctx context.Context, obj *models.FriendsConnection) ([]*models.FriendsEdge, error)
	Friends(ctx context.Context, obj *models.FriendsConnection) ([]models.Character, error)
}

type HumanResolver

type HumanResolver interface {
	Friends(ctx context.Context, obj *models.Human) ([]models.Character, error)
	FriendsConnection(ctx context.Context, obj *models.Human, first *int, after *string) (*models.FriendsConnection, error)

	Starships(ctx context.Context, obj *models.Human) ([]*models.Starship, error)
}

type MutationResolver

type MutationResolver interface {
	CreateReview(ctx context.Context, episode models.Episode, review models.Review) (*models.Review, error)
}

type QueryResolver

type QueryResolver interface {
	Hero(ctx context.Context, episode *models.Episode) (models.Character, error)
	Reviews(ctx context.Context, episode models.Episode, since *time.Time) ([]*models.Review, error)
	Search(ctx context.Context, text string) ([]models.SearchResult, error)
	Character(ctx context.Context, id string) (models.Character, error)
	Droid(ctx context.Context, id string) (*models.Droid, error)
	Human(ctx context.Context, id string) (*models.Human, error)
	Starship(ctx context.Context, id string) (*models.Starship, error)
}

type ResolverRoot

type ResolverRoot interface {
	Droid() DroidResolver
	FriendsConnection() FriendsConnectionResolver
	Human() HumanResolver
	Mutation() MutationResolver
	Query() QueryResolver
	Starship() StarshipResolver
}

type StarshipResolver

type StarshipResolver interface {
	Length(ctx context.Context, obj *models.Starship, unit *models.LengthUnit) (float64, error)
}

Jump to

Keyboard shortcuts

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