A walkthrough of using Spring for GraphQL's HttpSyncGraphQlClient to consume a GraphQL API from a Java client application. The tutorial covers setting up a standalone Spring Boot app with WebApplicationType.NONE, building the client using RestClient.Builder, writing document-based queries with variables, and mapping responses to entity classes using toEntity(). It also touches on the async alternative (retrieveSync vs retrieve with WebFlux), storing queries in resource files, and using the client for integration testing.

15m watch time

Sort: