SurrealDB Docs Logo

Enter a search query

Back to home
SurrealDB

SurrealDB

GraphQL

GraphQL

In this section, you will explore GraphQL, an industry-wide recognised protocol for interacting with your data, allowing you to query your data using any preferred method which offers precision and efficiency in data retrieval. And in combination with Surrealist, you can now manage your data in a user-friendly environment to simplify complex operations.

In SurrealDB, you can use GraphQL to query your data in Surrealist, a user-friendly interface specifically designed for SurrealDB.

Key Features

GraphQL offers a number of key features that make it a powerful tool for working with SurrealDB:

  • Declarative Data Fetching: GraphQL allows you to request exactly the data you need, no more and no less. This reduces over-fetching and under-fetching of data, leading to more efficient queries.

  • Strongly Typed Schema: GraphQL uses a strong type system to define the capabilities of an API. This schema serves as a contract between the client and the server, ensuring that queries are valid before execution.

  • Hierarchical Structure: GraphQL queries mirror the shape of the data they return, making it intuitive to work with nested data structures.

  • Single Endpoint: When using GraphQL over HTTP, it typically uses a single endpoint, simplifying API architecture and reducing network overhead.

  • Ecosystem and Tools: GraphQL has a rich ecosystem of tools for development, testing, and monitoring, including GraphiQL for query exploration and Apollo Client for state management.

Getting Started

To start using GraphQL, we recommend using Surrealist, our interactive environment that allows you to experiment with GraphQL queries and see the results immediately in the UI.

If you prefer using a GraphQL Client such as GraphiQL or Postman, you can use the GraphQL integration at the localhost:8000/graphql endpoint.

On this page

© SurrealDB GitHub Discord Community Cloud Features Releases Install