hi !! User type has a relationship with Post(not ...
# orm-help
y
hi !! User type has a relationship with Post(not null), and there is a user query that returns one User. from a nexus-generated-types.ts, the return type of the user query is a User type that does not include the posts field. any idea why it behaves this way ? is it because of the way the graphql field resolver works ?
r
Yes exactly. The
posts
field is a separate resolver which is why itโ€™s not included in the type.
y
thank you for answer. more curiously, where can i find the exact type for the User type(posts not null)that i declared as objectType api. does the code below correspond to that ?
r
Yes it will be this one ๐Ÿ‘
๐Ÿ‘ 1
y
thanks your apply !!