Protocols
Saved & recent

GraphQL

Also called: GraphQL API, GraphQL schema, resolvers

GraphQL defines a query language, a type system and execution rules for APIs. A client selects fields from the service’s schema, and server-side functions resolve those fields. It is not a database and does not require a graph database; a separate transport carries operations and responses.

A hypothetical query { book(id: 7) { title author { name } } } requests only those fields. The result follows that selected shape, subject to errors and nullability rules. The schema constrains available operations, while application logic must still enforce authorization and control expensive work. Asking for fewer fields does not guarantee fewer underlying database queries.

Related
REST, HTTP, Authorization
Further reading
GraphQL — Introduction
Book schema title author name country isbn select query selects fields book title author name book data author data server resolvers matching response book title: "Networks" author name: "Ada"
The query selects title and author.name; isbn is omitted from the response. Resolvers can use different data sources. The selected response shape neither defines the underlying database nor guarantees one database query.

View in the full Protocols collection