Industrial
02/05/2019, 11:39 PMIndustrial
02/05/2019, 11:40 PMgraphql-yoga in front of it to mange the outward facing API and other stuff, and using prisma behind that to get the CRUD goodness for the data model. But I'm calling it wrong from the Yoga Service.Industrial
02/05/2019, 11:41 PMmutation deleteChart($chartId: ID!) {
deleteChart(where: {
id: $chartId
}) {
id
}
}
Is the query in prisma that works.Industrial
02/05/2019, 11:41 PMmutation deleteChart($chartId: ID!) {
deleteChart(chartId: $chartId)
}
Is the query in yogaIndustrial
02/05/2019, 11:42 PMexport async function deleteChart(root, args, context, info) {
const options = {
data: {
where: {
id: args.chartId,
},
},
}
console.log('deleteChart options', options)
const result = await context.prisma.mutation.deleteChart(options, info)
console.log('deleteChart result', result)
return result
}
Is the implementation of the deleteChart resolver in the Yoga service.Industrial
02/05/2019, 11:42 PMdeleteChart options { data: { where: { id: 'cjrsemf2a00as0c662xxyma3j' } } }
deleteChart result undefined
Is the docker log outputnuno
02/06/2019, 9:56 AMnuno
02/06/2019, 9:57 AMconst options = {
where: {
id: args.chartId,
},
}