Edit: sorry, I thought you started another thread that was worded similarly. See https://community.shopify.com/topic/2672155
FYI, you can query by “product_type”, see filter docs here: https://shopify.dev/docs/api/admin-graphql/2024-04/queries/products#argument-query-filter-product_type