Does anyone know what the correct way in a resolve...
# prisma-whats-new
d
Does anyone know what the correct way in a resolver to run a query against our graphcool instance is? I am doing the following, which used to work, but no longer seems to:
Copy code
import { fromEvent } from "graphcool-lib";

export default async event => {
  const projectId = event.context.projectId;
  const api = fromEvent({ context: { graphcool: { projectId } } }).api(
    "simple/v1"
  );

  return api.request(reminderContactQuery, { reminderId }).then(result => {
    // do some stuff in here and return the result
  })
}
a
In a resolver, you can just do
fromEvent(event)
d
Thank you!