graph

package
v0.0.0-...-2f3620b Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 15 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 {
	Audit struct {
		After     func(childComplexity int) int
		Before    func(childComplexity int) int
		Comments  func(childComplexity int) int
		Created   func(childComplexity int) int
		CreatedBy func(childComplexity int) int
		Diff      func(childComplexity int) int
		ID        func(childComplexity int) int
		ObjectID  func(childComplexity int) int
		TableName func(childComplexity int) int
	}

	Fixit struct {
		Comments  func(childComplexity int) int
		Created   func(childComplexity int) int
		CreatedBy func(childComplexity int) int
		FieldName func(childComplexity int) int
		ID        func(childComplexity int) int
		Status    func(childComplexity int) int
		VocabID   func(childComplexity int) int
	}

	Mutation struct {
		CreateFixit func(childComplexity int, input model.NewFixit) int
		CreateVocab func(childComplexity int, input model.NewVocab) int
		UpdateFixit func(childComplexity int, input model.UpdateFixit) int
		UpdateVocab func(childComplexity int, input model.UpdateVocab) int
	}

	Query struct {
		Audit  func(childComplexity int, id *string) int
		Audits func(childComplexity int, tableName string, objectID string, startTime string, endTime string, limit int) int
		Fixit  func(childComplexity int, id *string) int
		Fixits func(childComplexity int, status model.Status, vocabID string, startTime string, endTime string, limit int) int
		Vocab  func(childComplexity int, id *string) int
		Vocabs func(childComplexity int, learningCode string, hasFirst bool, limit int) int
	}

	Vocab struct {
		Alternatives     func(childComplexity int) int
		FirstLang        func(childComplexity int) int
		Hint             func(childComplexity int) int
		ID               func(childComplexity int) int
		Infinitive       func(childComplexity int) int
		KnownLangCode    func(childComplexity int) int
		LearningLang     func(childComplexity int) int
		LearningLangCode func(childComplexity int) int
		NumLearningWords func(childComplexity int) int
		Pos              func(childComplexity int) int
		Skill            func(childComplexity int) int
	}
}

type Config

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

type DirectiveRoot

type DirectiveRoot struct {
}

type MutationResolver

type MutationResolver interface {
	CreateVocab(ctx context.Context, input model.NewVocab) (*model.Vocab, error)
	UpdateVocab(ctx context.Context, input model.UpdateVocab) (*model.Vocab, error)
	CreateFixit(ctx context.Context, input model.NewFixit) (*model.Fixit, error)
	UpdateFixit(ctx context.Context, input model.UpdateFixit) (*model.Fixit, error)
}

type QueryResolver

type QueryResolver interface {
	Vocab(ctx context.Context, id *string) (*model.Vocab, error)
	Vocabs(ctx context.Context, learningCode string, hasFirst bool, limit int) ([]*model.Vocab, error)
	Fixit(ctx context.Context, id *string) (*model.Fixit, error)
	Fixits(ctx context.Context, status model.Status, vocabID string, startTime string, endTime string, limit int) ([]*model.Fixit, error)
	Audit(ctx context.Context, id *string) (*model.Audit, error)
	Audits(ctx context.Context, tableName string, objectID string, startTime string, endTime string, limit int) ([]*model.Audit, error)
}

type Resolver

type Resolver struct{}

func (*Resolver) Mutation

func (r *Resolver) Mutation() MutationResolver

Mutation returns MutationResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

type ResolverRoot

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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