How to get all user posts from two post types in wp_query

Ye. It is possible with single query.

WordPress is allowed to fetch posts from different post type. For example, consider the default post types “post” and “page”

To fetch user posts from “post” and “page”, we can use the following query.

$wp_query = new WP_Query(array(
    'author' => $user_id,
    'post_type' => array('post', 'page'),
    'posts_per_page' => -1
        )
);

I have used posts_per_page as -1 to fetch all posts. This is working in a default WordPress install.

Refer WP_Query for more details.