How to look up reference values within active queries

Due to some performance limitations, queries on certain fields causing to many database connections because they have to be resolved first, I was thinking about getting that data mapping table myself and match it when certain fields are queried.
So let’s say you have a reference table like

{
  "data": {
    "ReferenceTable": {
      "Category_A": [
         {
            "name": "cat-1",
            "description": "Nothing to see here"
         },
         ...
      ],
      "Category_B": [ ... ]
   }
 }
}

So in every query that looks like

query SomeData {
  name
  Category_A {
    name
    description
  }
}

I want the cache to of course look for already cached data but also to use the ReferenceTable to look up the correct description for the Category_A with the name.
I know there are cache redirects, but the example is not so telling. Also I want all queries to use a look up in that way.
Also the ReferenceTable is a query with not variables and no keyValues it just holds collections of reference values with additional data, how do I even target that with read or reference or anything? How do I find those in the cace without digging into cache.data.data and filter manually?