SurrealDB · GraphQL Specification

SurrealDB GraphQL API

SurrealDB exposes an experimental GraphQL interface that dynamically generates a complete schema from your database's table definitions, field types, custom functions, and access definitions. Enabling GraphQL requires running the server with the `--allow-experimental graphql` flag (pre-1.0 series) or configuring the capability in the server config. Once enabled, each namespace/database pair activates GraphQL by executing a `DEFINE CONFIG GRAPHQL` statement, which controls which tables and user-defined functions are surfaced (`TABLES AUTO`, `TABLES INCLUDE ...`, `TABLES EXCLUDE ...`) along with optional depth and complexity limits and introspection behavior.

Documentation Endpoint View on GitHub DatabaseMulti-ModelGraph DatabaseDocument DatabaseVector DatabaseTime-SeriesSurrealQLAIMCPGraphQL

Overview

SurrealDB GraphQL API is a GraphQL API specification published by SurrealDB on the APIs.io network.

SurrealDB exposes an experimental GraphQL interface that dynamically generates a complete schema from your database’s table definitions, field types, custom functions, and access definitions. Enabling GraphQL requires running the server with the --allow-experimental graphql flag (pre-1.0 series) or configuring the capability in the server config. Once enabled, each namespace/database pair activates GraphQL by executing a DEFINE CONFIG GRAPHQL statement, which controls which tables and user-defined functions are surfaced (TABLES AUTO, TABLES INCLUDE ..., TABLES EXCLUDE ...) along with optional depth and complexity limits and introspection behavior.

The GraphQL endpoint is available at https://<host>/graphql. documentation is published at https://surrealdb.com/docs/surrealdb/querying/graphql.

The specification includes 2 reference links.

Tagged areas include Database, Multi-Model, Graph Database, Document Database, and Vector Database.

Endpoint

`https:///graphql`

References

Back to SurrealDB · All GraphQL Specs · GitHub