Interface GraphQlClient.RetrieveSubscriptionSpec
- Enclosing interface:
- GraphQlClient
public static interface GraphQlClient.RetrieveSubscriptionSpec
Declares options to decode a field in each response of a subscription.
-
Method Summary
Modifier and TypeMethodDescription<D> reactor.core.publisher.Flux<D>
Decode the field to an entity of the given type.<D> reactor.core.publisher.Flux<D>
toEntity
(ParameterizedTypeReference<D> entityType) Variant oftoEntity(Class)
with aParameterizedTypeReference
.<D> reactor.core.publisher.Flux<List<D>>
toEntityList
(Class<D> elementType) Decode the field to a list of entities with the given type.<D> reactor.core.publisher.Flux<List<D>>
toEntityList
(ParameterizedTypeReference<D> elementType) Variant oftoEntityList(Class)
withParameterizedTypeReference
.
-
Method Details
-
toEntity
Decode the field to an entity of the given type.- Parameters:
entityType
- the type to convert to- Returns:
- a stream of decoded entities, one for each response, excluding
responses in which the field is
null
without errors. Ends withFieldAccessException
for an invalid response or a failed field. May also end with aGraphQlTransportException
. - See Also:
-
toEntity
Variant oftoEntity(Class)
with aParameterizedTypeReference
. -
toEntityList
Decode the field to a list of entities with the given type.- Parameters:
elementType
- the type of elements in the list- Returns:
- lists of decoded entities, one for each response, excluding
responses in which the field is
null
without errors. Ends withFieldAccessException
for an invalid response or a failed field. May also end with aGraphQlTransportException
. - See Also:
-
toEntityList
Variant oftoEntityList(Class)
withParameterizedTypeReference
.
-