generated

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: MIT Imports: 12 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 {
	Droid struct {
		ID                func(childComplexity int) int
		Name              func(childComplexity int) int
		Friends           func(childComplexity int) int
		FriendsConnection func(childComplexity int, first *int, after *string) int
		AppearsIn         func(childComplexity int) int
		PrimaryFunction   func(childComplexity int) int
	}

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

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

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

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

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

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

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

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

type Config

type Config struct {
	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