TrustGraphGet Started

GraphQL

A query language for APIs that allows clients to request exactly the data they need, not related to graph databases despite the name.

Infrastructure

GraphQL is an API query language (NOT a graph database query language) that lets clients specify exactly what data they need.

Example Query

query {
  user(id: "123") {
    name
    email
    posts {
      title
      content
      comments {
        author
        text
      }
    }
  }
}

Note: Despite the name, GraphQL is for querying APIs, not graph databases. For graph databases, use Cypher or SPARQL.

See Also

Examples

  • query { user(id: '123') { name email posts { title } } }

Related Terms

Learn More