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