Documentation
¶
Index ¶
- type FieldTypeInfo
- type Schema
- type SchemaService
- func (s *SchemaService) ActivateSchema(version string) error
- func (s *SchemaService) CheckCompatibility(newSDL string) (bool, string)
- func (s *SchemaService) CreateSchema(version, sdl, createdBy string) (*Schema, error)
- func (s *SchemaService) GetActiveSchema() (*Schema, error)
- func (s *SchemaService) GetAllSchemas() ([]Schema, error)
- func (s *SchemaService) ValidateSDL(sdl string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FieldTypeInfo ¶
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
Click to show internal directories.
Click to hide internal directories.