artindaniel
12/08/2018, 11:10 AMSubscription: {
userUpdate: {
subscribe: async (parent, args, context) => {
const { userId } = args;
return context.prisma.$subscribe
.user({
id: userId,
mutation_in: ["UPDATED"]
})
.node();
},
resolve: payload => {
return payload;
}
}
}
subscription {
userUpdate(userId:"5c0b97f4be07770009dad41f") {
id
posts {
id
}
}
}
The problem is that the subscription doesn't resolve relationship fields. For example posts
returns null. Is this intended behavior or am I missing something? I'm using docker with Prisma 1.22 and the mongo db connector.