Hi. Can prisma log all queries (and variables obje...
# orm-help
i
Hi. Can prisma log all queries (and variables objects) happening for debugging?
I'm using
graphql-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.
Copy code
mutation deleteChart($chartId: ID!) {
  deleteChart(where: {
    id: $chartId
  }) {
    id
  }
}
Is the query in prisma that works.
Copy code
mutation deleteChart($chartId: ID!) {
  deleteChart(chartId: $chartId)
}
Is the query in yoga
Copy code
export 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.
Copy code
deleteChart options { data: { where: { id: 'cjrsemf2a00as0c662xxyma3j' } } }
deleteChart result undefined
Is the docker log output
n
You're using prisma-binding, right?
Shouldn't the options be:
Copy code
const options = {
      where: {
        id: args.chartId,
    },
  }