Interface GraphQlClient.RetrieveSpec

Enclosing interface:
GraphQlClient

public static interface GraphQlClient.RetrieveSpec
Declares options to decode a field in a single response.
  • Method Details

    • toEntity

      <D> reactor.core.publisher.Mono<D> toEntity(Class<D> entityType)
      Decode the field to an entity of the given type.
      Type Parameters:
      D - the type to convert to
      Parameters:
      entityType - the type to convert to
      Returns:
      Mono with the decoded entity; completes with FieldAccessException in case of field errors or an invalid response; completes empty if the field is null but has no errors.
      See Also:
    • toEntity

      <D> reactor.core.publisher.Mono<D> toEntity(ParameterizedTypeReference<D> entityType)
      Type Parameters:
      D - the entity type
      Parameters:
      entityType - the type to convert to
    • toEntityList

      <D> reactor.core.publisher.Mono<List<D>> toEntityList(Class<D> elementType)
      Variant of toEntity(Class) to decode to a List of entities.
      Type Parameters:
      D - the type to convert to
      Parameters:
      elementType - the type of elements in the list
    • toEntityList

      <D> reactor.core.publisher.Mono<List<D>> toEntityList(ParameterizedTypeReference<D> elementType)
      Type Parameters:
      D - the type to convert to
      Parameters:
      elementType - the type of elements in the list