This is very interesting.
I have been writing a library [1] to bridge relational databases efficiently to GraphQL APIs, and adopted a similar approach towards eliminating the redundancy in the schema definitions.
I currently rely on io-ts [2] which I also use for runtime verification of configuration options in an attempt to facilitate type verification to both JavaScript and Typescript consumers.
[1] https://gql-dal.github.io/greldal/ [2] https://lorefnon.tech/2018/03/25/typescript-and-validations-...