Annotation Interface NestedParameter
Places a parameter not on the query field but some field deeper in the request,
e.g. when you request a team but need to limit the number of members returned:
@GraphQlClientApi
interface TeamsApi {
Team team(String teamName, @NestedParameter("members") int limit);
}
Generates a request:
query team($teamName: String, $limit: Int!) {
team(teamName: $teamName) {
headQuarter
members(limit: $limit) {
name
}
}
}
To nest a parameter deeper in the request, provide the path of the fields delimited with a period,
e.g. teams.members. Note that multiple parameters can be bound to the same path.
The value is an array, so the same parameter value can be used for multiple destinations,
e.g. for Multiple requests.
-
Required Element Summary
Required Elements
-
Element Details
-
value
String[] value
-