eliezedeck
04/16/2018, 8:51 AMUPDATED mutation_in? I can't seem to be able to get any trigger about this. Only CREATED and DELETED work. I'm beginning to suspect it's a bug, but seeing the fact that we're at Prisma 1.6 (past stable 1.0), I have doubts that it might not be a bug.
I have the query:
subscription DepartmentMutation {
departmentSubscription(where: {
mutation_in: [CREATED, DELETED, UPDATED]
}) {
mutation
node {
id
name
}
updatedFields
previousValues {
id
}
}
}
with Resolver:
javascript
const Subscription = {
departmentSubscription: {
subscribe: async (parent, { where }, ctx, info) => {
return ctx.db.subscription.department(where, info)
}
}
}nilan
04/16/2018, 9:00 AMprisma-binding)eliezedeck
04/16/2018, 9:37 AMnilan
04/16/2018, 9:37 AMeliezedeck
04/16/2018, 9:38 AMnilan
04/16/2018, 9:38 AMnilan
04/16/2018, 9:39 AMprisma token, for example.eliezedeck
04/16/2018, 9:39 AMnilan
04/16/2018, 9:39 AMeliezedeck
04/16/2018, 9:41 AMeliezedeck
04/16/2018, 9:44 AMnilan
04/16/2018, 9:47 AMnilan
04/16/2018, 9:47 AMeliezedeck
04/16/2018, 9:48 AMmutation UpdateDepartment {
updateDepartment(where: {id: "cjg1wd8dm02dh0705amv0gq7r"}, data: {name: "Updated from Prisma API"}) {
id
name
}
}nilan
04/16/2018, 9:48 AMprisma cluster listeliezedeck
04/16/2018, 9:48 AMsubscription DepartmentsSub {
department(where: {
mutation_in: [CREATED, UPDATED, DELETED]
}) {
mutation
node {
id
name
}
updatedFields
previousValues {
id
}
}
}eliezedeck
04/16/2018, 9:49 AMprisma cluster list returns:
name version endpoint
āāāāāāāāāā āāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāāā
local 1.6.0 <http://localhost:4466/cluster>
prisma-eu1 1.6.0 <https://eu1.prisma.sh/cluster>
prisma-us1 1.6.0 <https://us1.prisma.sh/cluster>nilan
04/16/2018, 9:50 AMeliezedeck
04/16/2018, 9:50 AMDepartment type is simply:
type Department {
id: ID! @unique
name: String!
}eliezedeck
04/16/2018, 11:34 AMMike Clymer
04/16/2018, 12:14 PMeliezedeck
04/16/2018, 12:31 PMnilan
04/16/2018, 4:25 PM