services

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldTypeInfo

type FieldTypeInfo struct {
	TypeName       string
	FieldName      string
	TypeDefinition string
}

FieldTypeInfo represents a field with its type information

type Schema

type Schema struct {
	ID        string    `json:"id"`
	Version   string    `json:"version"`
	SDL       string    `json:"sdl"`
	IsActive  bool      `json:"is_active"`
	CreatedAt time.Time `json:"created_at"`
	CreatedBy string    `json:"created_by"`
	Checksum  string    `json:"checksum"`
}

Schema represents a GraphQL schema with basic versioning

type SchemaService

type SchemaService struct {
	// contains filtered or unexported fields
}

SchemaService handles schema management operations

func NewSchemaService

func NewSchemaService(db *database.SchemaDB) *SchemaService

NewSchemaService creates a new schema service

func (*SchemaService) ActivateSchema

func (s *SchemaService) ActivateSchema(version string) error

ActivateSchema activates a specific schema version

func (*SchemaService) CheckCompatibility

func (s *SchemaService) CheckCompatibility(newSDL string) (bool, string)

CheckCompatibility checks if a new SDL is backward compatible with the active schema

func (*SchemaService) CreateSchema

func (s *SchemaService) CreateSchema(version, sdl, createdBy string) (*Schema, error)

CreateSchema creates a new schema version

func (*SchemaService) GetActiveSchema

func (s *SchemaService) GetActiveSchema() (*Schema, error)

GetActiveSchema returns the currently active schema

func (*SchemaService) GetAllSchemas

func (s *SchemaService) GetAllSchemas() ([]Schema, error)

GetAllSchemas returns all schemas

func (*SchemaService) ValidateSDL

func (s *SchemaService) ValidateSDL(sdl string) bool

ValidateSDL validates GraphQL SDL syntax

Jump to

Keyboard shortcuts

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