generated

package
v0.0.0-...-f09f64d Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 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 CellResolver

type CellResolver interface {
	ID(ctx context.Context, obj *model.Cell) (string, error)
	Spreadsheet(ctx context.Context, obj *model.Cell) (*model.Spreadsheet, error)

	Version(ctx context.Context, obj *model.Cell) (string, error)
}

type ComplexityRoot

type ComplexityRoot struct {
	Cell struct {
		ColumnIndex   func(childComplexity int) int
		ComputedValue func(childComplexity int) int
		ID            func(childComplexity int) int
		RawValue      func(childComplexity int) int
		RowIndex      func(childComplexity int) int
		Spreadsheet   func(childComplexity int) int
		Version       func(childComplexity int) int
	}

	Mutation struct {
		CreateCell                            func(childComplexity int, input model.NewCell) int
		CreateSpreadsheet                     func(childComplexity int, input model.NewSpreadsheet) int
		RevertSpreadsheet                     func(childComplexity int, id string, version string) int
		UpdateCell                            func(childComplexity int, id string, input model.UpdateCell) int
		UpdateCellBySpreadsheetIDColumnAndRow func(childComplexity int, spreadsheetID string, columnIndex int, rowIndex int, input model.UpdateCell) int
		UpdateSpreadsheet                     func(childComplexity int, id string, input model.UpdateSpreadsheet) int
	}

	Query struct {
		Cells                   func(childComplexity int) int
		GetCell                 func(childComplexity int, id string) int
		GetCellsBySpreadsheetID func(childComplexity int, spreadsheetID string) int
		GetSpreadsheet          func(childComplexity int, id string) int
		GetVersions             func(childComplexity int, id string) int
		Spreadsheets            func(childComplexity int) int
	}

	Spreadsheet struct {
		ColumnCount func(childComplexity int) int
		ID          func(childComplexity int) int
		Name        func(childComplexity int) int
		RowCount    func(childComplexity int) int
	}

	Subscription struct {
		GetCellsBySpreadsheetID func(childComplexity int, spreadsheetID string) int
		GetVersions             func(childComplexity int, id string) int
	}

	Version struct {
		Version 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 {
	CreateCell(ctx context.Context, input model.NewCell) (*model.Cell, error)
	UpdateCell(ctx context.Context, id string, input model.UpdateCell) (*model.Cell, error)
	UpdateCellBySpreadsheetIDColumnAndRow(ctx context.Context, spreadsheetID string, columnIndex int, rowIndex int, input model.UpdateCell) (*model.Cell, error)
	CreateSpreadsheet(ctx context.Context, input model.NewSpreadsheet) (*model.Spreadsheet, error)
	UpdateSpreadsheet(ctx context.Context, id string, input model.UpdateSpreadsheet) (*model.Spreadsheet, error)
	RevertSpreadsheet(ctx context.Context, id string, version string) (*model.Spreadsheet, error)
}

type QueryResolver

type QueryResolver interface {
	Cells(ctx context.Context) ([]*model.Cell, error)
	GetCell(ctx context.Context, id string) (*model.Cell, error)
	GetCellsBySpreadsheetID(ctx context.Context, spreadsheetID string) ([]*model.Cell, error)
	Spreadsheets(ctx context.Context) ([]*model.Spreadsheet, error)
	GetSpreadsheet(ctx context.Context, id string) (*model.Spreadsheet, error)
	GetVersions(ctx context.Context, id string) ([]*model.Version, error)
}

type ResolverRoot

type ResolverRoot interface {
	Cell() CellResolver
	Mutation() MutationResolver
	Query() QueryResolver
	Spreadsheet() SpreadsheetResolver
	Subscription() SubscriptionResolver
}

type SpreadsheetResolver

type SpreadsheetResolver interface {
	ID(ctx context.Context, obj *model.Spreadsheet) (string, error)
}

type SubscriptionResolver

type SubscriptionResolver interface {
	GetCellsBySpreadsheetID(ctx context.Context, spreadsheetID string) (<-chan []*model.Cell, error)
	GetVersions(ctx context.Context, id string) (<-chan []*model.Version, error)
}

Jump to

Keyboard shortcuts

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