Len Smith
02/09/2022, 5:40 PMgql
string? I want to use the generated types, but there’s no guarantee we actually put the field in the query. Using the generated types, TypeScript tells us user.firstName
is guaranteed to exist, but it’s not in this case. Having to have a custom type for each query seems fragile, redundant and a lot of extra work, so I was wondering if there’re any solutions for this?Briggs
02/09/2022, 10:20 PMLen Smith
02/09/2022, 10:56 PMfirstName
in your gql
query, it’ll actually be undefined, even though the generated types say it’s there. I kinda’ want a type generated from the gql
string, although i know that’s probably an absurdly hard problem.Len Smith
02/09/2022, 10:57 PMPartial
with the types from the gql
string. We can do it ourselves but again, it feels redundant as well as less foolproof.Briggs
02/11/2022, 8:00 PM