api/ GraphQL Service
Last Updated: October 20, 2018

Accessing and modifying graph data using the industry-standard GraphQL language.

TigerGraph GraphQL Service

The TigerGraph GraphQL Service allows you to interact with your graph data using standard GraphQL queries, mutations, and fragments. It acts as a bridge, translating GraphQL requests into high-performance GSQL operations.

1. Schema Mapping

TigerGraph automatically generates a GraphQL schema based on your GSQL graph definition:

  • Vertex Types map to GraphQL Types.
  • Edge Types map to Fields on those types.
  • Attributes map to Scalar fields.

2. Querying Data

You can fetch specific fields of vertices and edges with nested queries:

graphqlterminal
query { User(where: { name: { eq: "John" } }) { name age Liked { title year } } }

3. Features

  • Filtering: Support for complex filters (e.g., eq, gt, lt, contains).
  • Sorting: Order results by any scalar attribute using the order_by argument.
  • Pagination: Limit results using first and offset arguments.
  • Mutations: Insert or delete vertices and edges using standard GraphQL mutation syntax.

4. Why Use GraphQL?

  • Efficiency: Fetch only the data you need, reducing network payload size.
  • Ecosystem: Use any standard GraphQL client (Apollo, Relay) to build applications.
  • Intuitive: Perfect for front-end developers who prefer declarative data fetching over REST endpoints.

[!NOTE] The GraphQL service is a standalone component that connects to the TigerGraph cluster. Ensure the service is running and the port (default 9000 or custom) is accessible.