Here's a 30 second tl;dw: The first two code samples explain the idea. https://hasura.io/blog/how-to-convert-typescript-types-to-gr...
Github repository that powers the typescript function to Hasura connector bit: https://github.com/hasura/ndc-typescript-deno