Annotation Interface Multiple
'Hide' or 'unwrap' the return type of the annotated method from GraphQL,
i.e. request the fields contained within the class directly.
The nested fields can optionally be parameterized with
NestedParameter annotations.
E.g.
@GraphQlClientApi
interface FooAndBarApi {
FooAndBar fooAndBar(@NestedParameter("bar") String id);
}
@Multiple
static class FooAndBar {
Foo foo;
Bar bar;
}
Creates a query for the two fields foo and bar:
query fooAndBar($id: String!) {
foo {
name
}
bar(id: $id) {
name
}
}
In this way, you can also issue multiple mutations with a single request.