use of examples.typesafeclient.SuperHero in project smallrye-graphql by smallrye.
the class MyClientUsage method execute.
public void execute() throws ExecutionException, InterruptedException {
Document document = document(operation(field("allHeroesIn", args(arg("location", "Outer Space")), field("name"), field("superPowers"))));
// <2>
Response response = client.executeSync(document);
// <3>
JsonArray heroesArray = response.getData().getJsonArray("allHeroesIn");
// <4>
List<SuperHero> heroes = response.getList(SuperHero.class, "allHeroesIn");
}