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.
func SetupHTTPServer ¶
func SetupHTTPServer(router chi.Router)
Types ¶
type ComplexityRoot ¶
type ComplexityRoot struct { AIChatMessage struct { Result func(childComplexity int) int Text func(childComplexity int) int Type func(childComplexity int) int } Column struct { Name func(childComplexity int) int Type func(childComplexity int) int } GraphUnit struct { Relations func(childComplexity int) int Unit func(childComplexity int) int } GraphUnitRelationship struct { Name func(childComplexity int) int Relationship func(childComplexity int) int } LoginProfile struct { Database func(childComplexity int) int ID func(childComplexity int) int Type func(childComplexity int) int } Mutation struct { AddRow func(childComplexity int, schema string, storageUnit string, values []*model.RecordInput) int AddStorageUnit func(childComplexity int, schema string, storageUnit string, fields []*model.RecordInput) int DeleteRow func(childComplexity int, schema string, storageUnit string, values []*model.RecordInput) int Login func(childComplexity int, credentials model.LoginCredentials) int LoginWithProfile func(childComplexity int, profile model.LoginProfileInput) int Logout func(childComplexity int) int UpdateStorageUnit func(childComplexity int, schema string, storageUnit string, values []*model.RecordInput) int } Query struct { AIChat func(childComplexity int, modelType string, token *string, schema string, input model.ChatInput) int AIModel func(childComplexity int, modelType string, token *string) int Database func(childComplexity int) int Graph func(childComplexity int, schema string) int Profiles func(childComplexity int) int RawExecute func(childComplexity int, query string) int Row func(childComplexity int, schema string, storageUnit string, where string, pageSize int, pageOffset int) int Schema func(childComplexity int) int StorageUnit func(childComplexity int, schema string) int } Record struct { Key func(childComplexity int) int Value func(childComplexity int) int } RowsResult struct { Columns func(childComplexity int) int DisableUpdate func(childComplexity int) int Rows func(childComplexity int) int } StatusResponse struct { Status func(childComplexity int) int } StorageUnit struct { Attributes func(childComplexity int) 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 MutationResolver ¶
type MutationResolver interface { Login(ctx context.Context, credentials model.LoginCredentials) (*model.StatusResponse, error) LoginWithProfile(ctx context.Context, profile model.LoginProfileInput) (*model.StatusResponse, error) Logout(ctx context.Context) (*model.StatusResponse, error) AddStorageUnit(ctx context.Context, schema string, storageUnit string, fields []*model.RecordInput) (*model.StatusResponse, error) UpdateStorageUnit(ctx context.Context, schema string, storageUnit string, values []*model.RecordInput) (*model.StatusResponse, error) AddRow(ctx context.Context, schema string, storageUnit string, values []*model.RecordInput) (*model.StatusResponse, error) DeleteRow(ctx context.Context, schema string, storageUnit string, values []*model.RecordInput) (*model.StatusResponse, error) }
type QueryResolver ¶
type QueryResolver interface { Profiles(ctx context.Context) ([]*model.LoginProfile, error) Database(ctx context.Context) ([]string, error) Schema(ctx context.Context) ([]string, error) StorageUnit(ctx context.Context, schema string) ([]*model.StorageUnit, error) Row(ctx context.Context, schema string, storageUnit string, where string, pageSize int, pageOffset int) (*model.RowsResult, error) RawExecute(ctx context.Context, query string) (*model.RowsResult, error) Graph(ctx context.Context, schema string) ([]*model.GraphUnit, error) AIModel(ctx context.Context, modelType string, token *string) ([]string, error) AIChat(ctx context.Context, modelType string, token *string, schema string, input model.ChatInput) ([]*model.AIChatMessage, 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 }
Click to show internal directories.
Click to hide internal directories.