Writing queryable APIs with MicroProfile GraphQL
summary
Shows a Java code-first MicroProfile GraphQL implementation using SmallRye on Quarkus to replace REST over-fetching: a Person type is stitched with a separate Score backend, queries return exactly requested fields (smaller payloads), and mutations handle create/update/delete. Demo includes partial error responses (errors array + partial data), metrics and tracing wired to Prometheus/Grafana/Jaeger, role-based security for fields, a request context exposing selected fields to build optimized SQL, and a GraphQL client mirroring the server model; examples run but hot-reload H2 glitches occur.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:18Agenda
- 2:05Context
- 5:50Rest Endpoint
- 12:22GraphQL
- 16:50MicroProfile
- 18:52Platform Specification
- 20:02GraphQL Examples
- 24:32Swagger UI
- 26:52GraphQL API
- 28:12GraphQL UI
- 32:27Mixing queries
- 34:02Random queries
- 35:22JSONB annotations
- 36:42Default value
- 37:47Save
- 38:47Partial Results
- 40:47Partial Errors
- 41:27Matrix and Tracing
- 47:32Mutation
- 53:27Client side
- 58:42Wrap up
related talks
50mWriting better APIs with MicroProfile GraphQL
35mInnovating MicroProfile with Quarkus and SmallRye
50mBuilding GraphQL APIs with Java
42mDeveloping and maintaining a Java GraphQL back-end
47mJakarta EE + MicroProfile: The Nonfunctional Features #slideless.
58mGraphQL -- Flexible APIs for Adaptive Clients
23mAn Introduction to GraphQL
59mGoodbye REST; Hello GraphQL
