While creating Block Themes in WordPress, how can I query custom posts for an Archive view?

I found a solution for this. So for those of you who face a similar situation, here’s what I did (based on this solution : https://stackoverflow.com/questions/68871598/wordpress-query-loop-block-not-showing-custom-post-types)

So basically the custom post type that I had created needed to have this argument while registering the post-type in functions.php

'show_in_rest' => true

And then I just had to replace the post type in the query and all the results of the query showed up.

And for those using the Full Site Editor view in WordPress the Block section for query loop will then display the registered custom post type in addition to ‘Post’ and ‘Page’ in the drop-down menu.

So custom posts types are supported in the query loop and it works well!!..:-)..