wuichen
04/19/2019, 9:47 AMquery {
user (where: {
email: "<mailto:chen1@gmail.com|chen1@gmail.com>"
}) {
id
workspaces {
id
}
}
}
{
"data": {
"user": {
"id": "cjunu2avf5lra0b30tqyc62mb",
"workspaces": [
{
"id": "cjunu33pa8h3a0b12zsmax1fw"
}
]
}
}
}
however when i try to get the same thing in rest api in my server code
const user = await this.prisma.user({
email: this.user.email
});
console.log(user);
i can only get partial data like this. i can’t figure out how to get workspaces array to be included
{ id: 'cjunu2avf5lra0b30tqyc62mb',
email: '<mailto:ichenwu01@gmail.com|ichenwu01@gmail.com>' }nuno
04/23/2019, 11:27 AMworkspaces resolver. Take a look at: https://www.prisma.io/tutorials/a-guide-to-common-resolver-patterns-ct08/#scenario-implementing-relations-with-prisma-client