How can I use a variant metafield to access a product's attributes?

Alternatively, is there any way to assign a variant from a variant ID similar to the all_product function eg

Instead of:
{% assign product = all_products[product-handle] %}

Something like:
{% assign variantId = product.metafields.bundle.product_1 | replace: ‘gid://shopify/ProductVariant/’‘,’’
{% assign variant = all_variants[variantId] %}

{{ variant.title }}

Or is there a way to use GraphQL objects with Liquid?