This issue is how to add a virtual field with materialized path.
In vanilla objection, this can be done with an extended query builder and extended select method that adds an eager parent relation loading if the virtual field is requested. Then this data is picked up in the getter of the virtual field with a traverse call. This is a very elegant solution.
Now, objection-graphql does not seem to use the select method at all when doing a query, so then this solution above is not valid. Is there any other way and why should not only the requested fields from the graphql query be fetched?
This is a continuation of #264.
This issue is how to add a virtual field with materialized path. In vanilla objection, this can be done with an extended query builder and extended select method that adds an eager parent relation loading if the virtual field is requested. Then this data is picked up in the getter of the virtual field with a traverse call. This is a very elegant solution.
Now, objection-graphql does not seem to use the select method at all when doing a query, so then this solution above is not valid. Is there any other way and why should not only the requested fields from the graphql query be fetched?
Many thanks!