Skip to content
excalibase
graphql
GraphQL APIstable

Excalibase GraphQL

Point it at your database. Get a full GraphQL API. Zero code.

Excalibase introspects your schema and generates a complete GraphQL API: queries, mutations, subscriptions, relationships, filtering and pagination. No schema files, no resolvers, no code generation step. Each request compiles to a single SQL statement.

On Excalibase Cloud

Every project has one endpoint, https://api.excalibase.io/{projectId}/graphql. It accepts POST only (the same path carries realtime over WebSocket): there is no GraphiQL page to open in a browser, so use the SDK or any GraphQL client. Exchange a key for a token, then send it as Authorization: Bearer $TOKEN:

curl -s -X POST "$BASE/$PROJECT_ID/graphql" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query":"{ publicFeedbackPosts(limit: 2) { id kind body } }"}'

What the schema contains depends on the caller: a table, column or operation the role has no permission for is not in its schema, and asking for it answers Unknown field(s): <name>. Introspection shows the same schema the role can query.

For every table the role can read, the schema has:

  • Queries: a list with where, orderBy, limit and offset; a Relay-style ...Connection with first and after; an ...Aggregate field where the role may aggregate.
  • Mutations: create, update, delete and createMany, where the role may write.
  • Relationships: foreign keys become nested fields in both directions, with no join to write.
  • Subscriptions: a ...Changes field per table, over the same endpoint. See Subscriptions.
  • Tracked functions: callable as root fields. Arguments go directly on the field, publicLectureSearch(search_text: "rim lighting") { ... }, not in Hasura's args: {...}.

Names carry the schema as a prefix: table feedback_posts in schema public is publicFeedbackPosts. Bigint and decimal columns arrive as strings, such as an id of "42"; see Numbers.

A tracked function must return rows of a table or view: RETURNS SETOF <table or view>, or one row of it. RETURNS TABLE(...) is refused with 400, because permissions apply to a row type. For a custom shape, create a view with those columns, give it a select permission, and return SETOF that view.

{
  __type(name: "Query") {
    fields { name }
  }
}

Typed errors (unique_violation, permission_denied and the rest) travel in extensions.code; see Errors.

Self-hosting

This section is for running the engine yourself.

  • Schema changes are picked up from DDL events sent by excalibase-watcher, with no restart.
  • A standalone engine serves http://localhost:10000/graphql for PostgreSQL and :10001 for MySQL, and its GraphiQL playground runs on a separate port (20000 in the Docker setup). GraphiQL is self-hosted only: GET /graphql on Excalibase Cloud answers 405.
  • Ships as a GraalVM native binary, so startup is under 100 ms: docker pull excalibase/excalibase-graphql:native.
DatabaseStatusNotes
PostgreSQLSupportedFull feature set, PG 15+
MySQLSupportedCRUD, ENUM/JSON, views, stored procedures, MySQL 8.4+
MongoDBPlanned

github.com/excalibase/excalibase-graphql