how to use include #80
Answered
by
MichalLytek
lewisblackburn
asked this question in
Q&A
-
@Query(() => [Tweet], {
nullable: false,
})
async tweets(
@Ctx() ctx: Context,
@Args() args: FindManyTweetArgs
): Promise<Tweet[]> {
const tweets = await ctx.prisma.tweet.findMany({
include: {
author: true,
},
});
console.log(tweets);
return tweets;
} I'm having trouble returning included data with GraphQL if anyone can help me out that would be great :) Sorry if this is the wrong place ask! |
Beta Was this translation helpful? Give feedback.
Answered by
MichalLytek
Mar 16, 2021
Replies: 1 comment 3 replies
-
Have you read the docs? |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
MichalLytek
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you read the docs?
https://github.com/MichalLytek/typegraphql-prisma/blob/main/Readme.md