api/ GraphQL Service
Last Updated: October 20, 2018Accessing 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:
graphqlterminalquery { 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_byargument. - Pagination: Limit results using
firstandoffsetarguments. - 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
9000or custom) is accessible.
On this page
TigerGraph Book
v1.0 Curated