Schema Overview
Olytix Core provides a fully-typed GraphQL API built on Strawberry. The schema is designed to expose the semantic layer in a flexible, introspectable format.
GraphQL Endpoint
POST /graphql
The GraphQL endpoint accepts standard GraphQL requests and supports introspection.
curl -X POST http://localhost:8000/graphql \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "{ cubes { name title } }"
}'
Root Types
The schema defines three root types:
| Type | Description |
|---|---|
Query | Read operations for cubes, queries, lineage, and search |
Mutation | Write operations for cache invalidation and pre-aggregation management |
Subscription | Real-time updates for query results and pre-aggregation status |
Core Types
Cube
The central entity representing a semantic cube with measures and dimensions.
type Cube {
name: String!
title: String
description: String
measures: [Measure!]!
dimensions: [Dimension!]!
segments: [Segment!]!
joins: [Join!]!
query(
measures: [String!]
dimensions: [String!]
filters: [FilterInput!]
timeDimensions: [TimeDimensionInput!]
order: [OrderInput!]
limit: Int
offset: Int
timezone: String
): QueryResult!
}
Measure
A metric or aggregation defined within a cube.
type Measure {
name: String!
title: String
description: String
type: MeasureType!
format: String
drillMembers: [String!]!
hasTimeIntelligence: Boolean!
timeIntelligenceType: String
}
Dimension
A grouping or filtering attribute within a cube.
type Dimension {
name: String!
title: String
description: String
type: DimensionType!
granularities: [TimeGranularity!]
isPrimaryTimeDimension: Boolean!
values(limit: Int = 100, search: String): [DimensionValue!]!
}
QueryResult
The result of executing a semantic query.
type QueryResult {
data: JSON!
meta: QueryMeta!
annotation: JSON
}
type QueryMeta {
totalCount: Int
executionTimeMs: Float!
fromCache: Boolean!
preAggregationUsed: String
sql: String
}
LineageResult
Column-level lineage information for a measure or dimension.
type LineageResult {
nodes: [LineageNode!]!
edges: [LineageEdge!]!
}
type LineageNode {
id: String!
name: String!
type: String!
cube: String
sql: String
}
type LineageEdge {
source: String!
target: String!
relationship: String!
}
Enums
MeasureType
enum MeasureType {
COUNT
COUNT_DISTINCT
COUNT_DISTINCT_APPROX
SUM
AVG
MIN
MAX
NUMBER
RUNNING_TOTAL
BOOLEAN
}
DimensionType
enum DimensionType {
STRING
NUMBER
TIME
BOOLEAN
GEO
}
TimeGranularity
enum TimeGranularity {
SECOND
MINUTE
HOUR
DAY
WEEK
MONTH
QUARTER
YEAR
}
FilterOperator
enum FilterOperator {
EQUALS
NOT_EQUALS
CONTAINS
NOT_CONTAINS
STARTS_WITH
ENDS_WITH
GT
GTE
LT
LTE
IN_DATE_RANGE
NOT_IN_DATE_RANGE
BEFORE_DATE
AFTER_DATE
SET
NOT_SET
}
OrderDirection
enum OrderDirection {
ASC
DESC
}
LineageDirection
enum LineageDirection {
UPSTREAM
DOWNSTREAM
}
SearchType
enum SearchType {
CUBE
MEASURE
DIMENSION
METRIC
}
Input Types
FilterInput
input FilterInput {
member: String!
operator: FilterOperator!
values: [String!]
}
TimeDimensionInput
input TimeDimensionInput {
dimension: String!
granularity: TimeGranularity
dateRange: [String!]
}
OrderInput
input OrderInput {
member: String!
direction: OrderDirection = ASC
}
Introspection
Use GraphQL introspection to explore the full schema:
query IntrospectionQuery {
__schema {
types {
name
description
fields {
name
type {
name
}
}
}
}
}
Or query specific types:
query {
__type(name: "Cube") {
name
fields {
name
description
type {
name
kind
}
}
}
}