Possible to automatically box and unbox types?

In our schema we box basic types, so that we can use them in unions.
Example:

type BoxedStringType {
  value: String
}
type Something {
}

union Together = BoxedStringType | Something

type Query {
  test_function: Together
}

We use typescript in our backend, so the code for this resolver would look something like this

async test_function(_, _, _, _): Promise<BoxedStringType | Something> {
  return {value: "something"};
}

This boxing is very annoying and what I would like would be this:

async test_function(_, _, _, _): Promise<string | Something> {
  return "something";
}

Is there something ( some kind of config or mapper ) that can be set so that if the return-type of a function is boxed, that I can define, for that box, a mapper that boxes the result for me.