liveBook · Manning

GraphQLClientApi annotation

As explained in Quarkus in Action

The GraphQLClientApi annotation declares a Java interface as a client-side view of a GraphQL API and assigns its client configuration key.

The GraphQLClientApi annotation declares a Java interface as a client-side view of a GraphQL API. Its configKey names the client, linking that interface to configuration and allowing several GraphQL clients to use different settings. section 4.5.4

Inventory client

A Reservation service can expose an allCars method while mapping it to the server's cars query with @Query("cars"). The resulting client supplies inventory data to the reservation availability endpoint.

How Quarkus in Action covers it

How deep it goes
Explains declaration, configuration mapping, query naming, and injection, while deferring dynamic-client details.
Examples
Uses a GraphQLInventoryClient, an inventory URL, the cars query, and a reservation availability response.
What it assumes
Assumes Java interfaces, domain classes, application properties, and basic GraphQL query naming.
What you can do after
Build a configured typesafe GraphQL client and inject it into a Reservation resource.
How it connects
Connects GraphQL APIs with typesafe clients, configuration, dependency injection, domain classes, and dynamic GraphQL clients.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Quarkus in Action. The section links point to the parts of the book it draws on.