SurrealQL is the query language for SurrealDB. How they reach the database depends on your tool or integration. The sections below describe each path in more detail.
SurrealQL execution paths
The following four approaches are the most commonly used ways to execute SurrealQL queries directly or indirectly via SDKs in one of many programming languages.
| Approach | Typical use |
|---|---|
| Surrealist | Interactive editing, Sandbox, and visual results in the browser. |
| CLI | Local development, scripts, and surreal sql against a running server. |
| HTTP | Services and integrations that call the /sql endpoint. |
| SDKs | Application code using the official clients (WebSocket or HTTP under the hood, depending on SDK and configuration). |
For a single entry point into these guides, see Executing queries.
Interactive clients (including the SDKs) usually speak to the database over WebSocket or HTTP. The RPC protocol describes how queries and responses are framed on the wire.
Language syntax, statements, and functions are documented in the SurrealQL reference.
GraphQL
GraphQL is a separate query interface on top of SurrealDB: you describe fields and shapes in GraphQL, not in SurrealQL. You can use it from Surrealist, over HTTP, or from tools such as Postman or Bruno.