Replies: 1 comment
-
@ObjectType()
class Rate {
@Field(type => Int)
value: number;
@Field()
date: Date;
user: User;
}
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Say I want to get the author from a post, but the post only has an author ID (simple).
But, from the database we only have
authorId
.What's the idiomatic way to structure this with TypeGraphQL? Essentially, I want my query resolver to return something different than the type it's resolving for, and let the field resolvers work it out.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions