title: How to convert Mono<List> object to simple List object in java?
body: <p>I am trying to create a POST API using JAVA web-flux. In this API I want to create a list of string and make a database call to get <code>Mono&lt;List&gt;</code> as a response but when I am trying to convert <code>Mono&lt;List&gt;</code> to simple list object using <code>block()</code> I'm getting below response:</p>
  <pre><code>{
      &quot;code&quot;: 500,
      &quot;message&quot;: &quot;block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-nio-8&quot;
  }
  </code></pre>
  <p>How can I convert Mono object to simple List object?</p>
  <p>I'm using below code:</p>
  <pre><code>List&lt;String&gt; paymentInstrumentIdList = paymentInstrumentRequest.getPaymentInstruments().stream().map(PaymentInstrumentData::getPaymentInstrumentId).collect(Collectors.toList());
  Mono&lt;List&lt;PaymentInstrument&gt;&gt; paymentInstrumentList = paymentInstrumentRepository.getByPartitionKey(partitionKey.toString(), DocType.PAYMENT_INSTRUMENT, paymentInstrumentIdList);
  return ResponseEntity.ok(responseMapper.getResponseAsClass(graphQlQueryController.queryPaymentInstrumentsByPaymentInstrumentId(baseHeaders, personId, membershipId, paymentInstrumentList.block()), Wallet.class, &quot;Wallet&quot;));
  </code></pre>