spences10
08/09/2017, 1:46 PMspences10
08/09/2017, 1:46 PMsascha
08/09/2017, 2:34 PMjoeblack74
08/09/2017, 2:56 PMtakeshiamano
08/09/2017, 3:19 PMtakeshiamano
08/09/2017, 3:20 PMnotrab
08/09/2017, 4:13 PMadmin
set to true?notrab
08/09/2017, 4:13 PMROLE
examplemwickett
08/09/2017, 5:36 PMmatthewhager
08/09/2017, 6:52 PMrobotofthefuture
08/09/2017, 7:17 PMrobotofthefuture
08/09/2017, 7:18 PMolaf
08/09/2017, 7:19 PMpost
, for that it needs to compare the new values against the old to specify what exactly changed.
It works well for scalar fields, but having trouble with relations.
(By the way, am aware that the function itself won’t trigger from a change in the relation, will address that with the Dummy field workaround)
What I have now:
subscription {
Post(filter: {
mutation_in: [CREATED, UPDATED, DELETED]
}) {
updatedFields
node {
id
name
admins {id}
}
previousValues {
id
name
admins: id
}
}
}
So far updatedFields
will give all admins on the post, but previousValues
doesn’t and will not accept the same format. It does give the id of 1 admin when formatted as above.donald
08/09/2017, 7:27 PMgraphcool-lib
. I can't get even basic queries to return results. Am I doing something incorrect here? const fromEvent = require('graphcool-lib').fromEvent
const getUser = function (api) {
const query = `
query {
allUsers {
id
}
}
`
return api.request(query)
.then(data => console.log(data))
}
module.exports = function (event) {
const graphcool = fromEvent(event)
const api = graphcool.api('simple/v1')
return getUser(api)
.then(data => console.log(data))
.catch(err => console.log(err))
}
wesbos
08/09/2017, 7:54 PMdonald
08/09/2017, 8:06 PMwesbos
08/09/2017, 8:09 PMdonald
08/09/2017, 8:11 PMuser
08/09/2017, 8:20 PMhttps://prisma.slack.com/files/U5E4N8TGT/F6MHTSYP9/screen_shot_2017-08-09_at_3.09.40_pm.png▾
donald
08/09/2017, 8:26 PMmel
08/09/2017, 9:32 PMTRANSFORM_ARGUMENT
step? When a user record is updated with a stripeToken
field, I'd like to create a Stripe customer and add the customer id to the user update fields. I would do it in the PRE_WRITE
step but I can't update the mutation fields.wallslide
08/09/2017, 9:42 PMdtuite
08/09/2017, 11:18 PMdtuite
08/09/2017, 11:20 PMnilan
08/09/2017, 11:20 PMnilan
08/09/2017, 11:20 PMdtuite
08/09/2017, 11:21 PMdtuite
08/09/2017, 11:37 PMString
well. I can test how they react tomorrow.dtuite
08/10/2017, 12:12 AMuser
08/10/2017, 12:33 AMhttps://prisma.slack.com/files/U5K3L5Q20/F6KU94AG0/account.png▾