Installation Guide¶
Prerequisites¶
- Docker and Docker Compose
- (Local dev only) Java 21+, Maven 3.8+
Option 1: Docker (Recommended)¶
PostgreSQL Stack¶
git clone https://github.com/excalibase/excalibase-graphql.git
cd excalibase-graphql
docker-compose up -d
API available at http://localhost:10000/graphql
MySQL Stack¶
API available at http://localhost:10001/graphql
Check Status¶
What's Included¶
Both stacks start with sample data so you can query immediately.
PostgreSQL (docker-compose.yml)¶
- Image:
postgres:15-alpineon port 5432 - Database/Schema:
hana - Credentials:
hana001/password123
Sample tables:
- users, posts, comments, tasks — blog-style demo data with custom enum/composite types
- customer, orders, products, order_items — e-commerce data with FK relationships
- enhanced_types — JSON/JSONB, arrays, INET, CIDR, MACADDR, BYTEA, XML, TIMESTAMPTZ
- wallets — for stored procedure testing
- rls_orders — Row-Level Security demo table
Views: active_customers, posts_with_authors, enhanced_types_summary (materialized)
Stored procedures: get_customer_order_count, transfer_funds
MySQL (docker-compose.mysql.yml)¶
- Image:
mysql:8.4on port 3306 - Database:
excalibase - Credentials:
excalibase/password123
Sample tables: customer, orders, product, task (ENUM columns), product_detail (JSON columns), wallets
Views: active_customers, orders_summary, high_value_orders
Stored procedures: get_customer_order_count, transfer_funds
Sample Queries¶
Basic Query¶
With Filtering and Relationships¶
{
hanaPosts(where: { published: { eq: true } }, orderBy: { created_at: ASC }) {
id
title
author_id
hanaUsers {
username
first_name
}
}
}
Custom Enum and Composite Types (PostgreSQL)¶
{
hanaUsers {
id
username
role # user_role enum: admin, moderator, user, guest
shipping_address # address composite type
contact # contact_info composite type
}
}
Aggregate¶
Stored Procedure¶
Option 2: Local Development¶
-
Configure database in
modules/excalibase-graphql-api/src/main/resources/application.yaml: -
Build and run:
Option 3: Native Binary (GraalVM)¶
Pull the pre-built native image for minimal startup time (~50ms) and memory (~80MB):
Or build locally (requires GraalVM 21):
JAVA_HOME=~/.sdkman/candidates/java/21.0.2-graalce
mvn -Pnative package -DskipTests -pl modules/excalibase-graphql-api -am
Common Commands¶
# Stop everything
docker-compose down
# Reset data (removes volumes)
docker-compose down -v && docker-compose up -d
# View logs
docker-compose logs -f excalibase-app
# Connect to PostgreSQL directly
docker-compose exec postgres psql -U hana001 -d hana
# Connect to MySQL directly
docker-compose -f docker-compose.mysql.yml exec mysql mysql -u excalibase -ppassword123 excalibase
Troubleshooting¶
App won't start — check that the database container is healthy before the app starts:
Empty GraphQL schema — the app builds the schema from the database at startup. If the DB wasn't ready, restart the app:
Port conflict — edit the host port mapping in docker-compose.yml:
Next Steps¶
- API Reference → — full schema documentation
- Filtering → — all filter operators with examples
- MySQL Support → — MySQL-specific guide
- Stored Procedures → — calling procedures from GraphQL
- Subscriptions → — real-time CDC subscriptions (PostgreSQL)