GraphQL is a query language and API runtime that lets clients request exactly the fields they need. By avoiding overfetching and underfetching, it can reduce request counts and network traffic, making it useful for constrained environments such as mobile applications. section 4.4
A GraphQL schema defines a data model through types and fields. Clients call operations with parameters and receive a defined return type. GraphQL does not prescribe storage: resolvers can expose databases, in-memory structures, or multiple unrelated sources through one unified API. section 4.4
A Quarkus implementation follows a code-first workflow:
- Model the exposed data with Java classes whose fields become corresponding GraphQL fields. section 4.5.1
- Begin with an in-memory data structure, then replace or extend it with persistent storage or other data sources. section 4.4
Inventory service
An Inventory service models cars with fields such as identifier, license plate number, manufacturer, and model. A GraphQL API exposes a cars query backed by CarInventory, while register and remove mutations manage the in-memory fleet. Quarkus generates the schema from the annotated Java API. section 4.5.1





