GraphQL API

Apollo Federation v2.3 subgraph — 2 core types, 4 queries, 6 mutations.

Endpoints

EnvironmentURL
Localhttp://localhost:4052/graphql
Staginghttps://staging-api.eventzr.com/graphql
Productionhttps://api.eventzr.com/graphql

Authentication

All GraphQL operations require a valid JWT token. Tenant isolation is automatic — all queries are scoped to the tenantId from JWT claims.

Authorization headertext
Authorization: Bearer <JWT>

Core Types

Taxonomy

Taxonomy typegraphql
type Taxonomy @key(fields: "id") @shareable {
  id: ID!                # ULID format
  tenantId: String       # null for platform-level taxonomies
  name: String!          # Unique kebab-case identifier
  displayName: String!   # Human-readable name
  description: String
  scope: String!         # PLATFORM | TENANT | CUSTOM
  status: String!        # DRAFT | ACTIVE | ARCHIVED | DEPRECATED
  version: Int!
  published: Boolean!
  locked: Boolean!
  lockedBy: String
  lockedAt: String
  maxDepth: Int!
  itemCount: Int!
  items: [TaxonomyItem!] # Not loaded by default
  createdAt: String!
  updatedAt: String!
}

TaxonomyItem

TaxonomyItem typegraphql
type TaxonomyItem {
  key: String!           # Unique within taxonomy
  label: String!         # Display label
  description: String
  parentKey: String      # null for root items
  depth: Int!
  sortOrder: Int!
  metadata: JSON
  deprecated: Boolean!
  children: [TaxonomyItem!]
}

Queries

List taxonomiesgraphql
query ListTaxonomies($scope: String, $status: String) {
  taxonomies(scope: $scope, status: $status) {
    id
    name
    displayName
    scope
    status
    itemCount
    version
  }
}
Get taxonomy with itemsgraphql
query GetTaxonomy($name: String!) {
  taxonomy(name: $name) {
    id
    name
    displayName
    items {
      key
      label
      parentKey
      depth
      children {
        key
        label
      }
    }
  }
}

Mutations

Create taxonomygraphql
mutation CreateTaxonomy($input: CreateTaxonomyInput!) {
  createTaxonomy(input: $input) {
    id
    name
    displayName
    status
  }
}

Federation

Apollo Federation v2.3

The taxonomy-svc contributes Taxonomy and TaxonomyItem entities to the EventZR federated graph. Other services can reference these types using Federation directives.

Directives used: @key, @shareable, @external, @requires, @provides