I did see some other libraries in js using a concept called "custom directives" do do it. I believe it is something that is built into the graphql spec but idk if it is supported by kgraphql yet. I havent used that approach ever so i cant vouch for it but other people seemed pleased with it.