public interface ClientGraphQlResponse extends GraphQlResponse
GraphQlResponse for client use, with further options to handle the
response.| Modifier and Type | Method and Description |
|---|---|
ClientResponseField |
field(String path)
Navigate to the given path under the "data" key of the response map where
the path is a dot-separated string with optional array indexes.
|
<D> D |
toEntity(Class<D> type)
Decode the full response map to the given target type.
|
<D> D |
toEntity(ParameterizedTypeReference<D> type)
Variant of
toEntity(Class) with a ParameterizedTypeReference. |
getData, getErrors, getExtensions, isValid, toMapClientResponseField field(String path)
Example paths:
"hero" "hero.name" "hero.friends" "hero.friends[2]" "hero.friends[2].name"
field in interface GraphQlResponsepath - relative to the "data" keyResponseField.getValue() to check if
the field actually has a value.<D> D toEntity(Class<D> type)
type - the target classnullFieldAccessException - if the response is not valid<D> D toEntity(ParameterizedTypeReference<D> type)
toEntity(Class) with a ParameterizedTypeReference.type - the target typenullFieldAccessException - if the response is not valid