Quarkus GraphQL UI is a browser interface for manually composing and executing operations against a GraphQL endpoint. It is a modified version of GraphiQL. With the Inventory service running in Dev mode, open http://localhost:8083/q/graphql-ui/ to try its car queries and mutations. section 4.5.2
The interface has three working areas:
- Write an operation in the top-left editor. Press Ctrl+Space for suggestions derived from the GraphQL schema, including available queries and fields. section 4.5.2
- Enter variable values or HTTP headers in the bottom-left area, then select the blue Play button to execute the operation. section 4.5.2
- Read the result in the pane on the right. section 4.5.2
Query the fleet
Run `query { cars { id licensePlateNumber model manufacturer } }` to retrieve the registered cars with those four fields. Autocompletion can suggest `cars` and then the fields of its `Car` type; the result appears as JSON under `data.cars`. section 4.5.2
Register and verify a car
Use a `register(car: { ... })` mutation to add a car and request its fields in the response. Later, the same UI can query the Inventory service to check its preloaded cars and verify registrations made through either its GraphQL or gRPC API. A UI result checks the exposed API; a separate MySQL query can confirm database records directly. section 4.5.2 section 7.2.2
Do not confuse GraphQL UI with Quarkus Dev UI. Dev UI is unavailable in production mode, but GraphQL UI can be explicitly included there by setting `quarkus.smallrye-graphql.ui.always-include=true` in `application.properties`. In the shown Inventory configuration, it remains available at http://localhost:8083/q/graphql-ui/. section 11.1.1
