Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedGraphQLService ¶
type CachedGraphQLService struct {
// contains filtered or unexported fields
}
CachedGraphQLService implements GraphQLService with an in-memory schema cache. The cached DynamicSchema contains only the GraphQL type system and schema metadata (a few KB). Object data is loaded from disk at query time via the ObjectLoader.
func NewCachedGraphQLService ¶
func NewCachedGraphQLService(provider CatalogDataProvider) *CachedGraphQLService
func (*CachedGraphQLService) ExecuteQuery ¶
func (*CachedGraphQLService) GetSchema ¶
func (s *CachedGraphQLService) GetSchema(ctx context.Context, catalog string) (*gql.DynamicSchema, error)
func (*CachedGraphQLService) InvalidateCache ¶
func (s *CachedGraphQLService) InvalidateCache(catalog string)
type CatalogDataProvider ¶ added in v1.11.0
type CatalogDataProvider interface {
LoadCatalogSchema(catalog string) (*gql.CatalogSchema, error)
NewObjectLoader(catalog string) (gql.ObjectLoader, error)
}
CatalogDataProvider provides access to catalog data for GraphQL schema building. Implemented by the storage layer.
type GraphQLService ¶
type GraphQLService interface {
GetSchema(ctx context.Context, catalog string) (*gql.DynamicSchema, error)
ExecuteQuery(ctx context.Context, catalog string, query string) (*graphql.Result, error)
InvalidateCache(catalog string)
}
GraphQLService handles GraphQL schema generation and query execution for catalogs
Click to show internal directories.
Click to hide internal directories.