by evolveyourmind · 3y ago · 0 comments
A real world use-case could be parsing GraphQL raw string queries and automatically infer the returned types based on a common schema, without using special code-generators. For instance you can come up with some magic function `gql_parsed` like:
doc = gql_parsed`query GetUser { user { name }}`
where doc is inferred as something like Doc<Query<{GetUser:{user:{name:string}}}>>
No comments yet.