Prisma1: Error when deploying operationBefore or operationAfter hooks

Created on 15 Oct 2017  Â·  6Comments  Â·  Source: prisma/prisma1

What is the current behavior?
Error when deploying:

There are issues with the new service definition:

  Global
    ✖ unhandled error: File with path 'src/validateEmail.js' does not exist

Please share the relevant part of your project (GraphQL schema, functions, permissions, ...) for easier reproduction

Functions part of graphcool.yml:

functions:
  hello:
    handler:
      code: src/hello.js
    type: resolver
    schema: src/hello.graphql
  validateEmail:
    type: operationBefore
    operation: User.create
    handler:
      code: src/validateEmail.js

Reproducible in this minimal sample project:
https://github.com/richardkall/graphcool-hook-issue


Using graphcool/0.7.0 (darwin-x64) node-v8.5.0

bu2-confirmed arenext

All 6 comments

I'm also seeing this issue as described. @marktani is aware.

This is fixed in the latest @alpha version and will be released to @next in 0.8.

any idea when the 0.8 will be released ?

You can follow along the milestones here: https://github.com/graphcool/graphcool/milestones 🙂

@antho1404 Since this was a backend change and that is already rolled it should be working now as intended. No need to wait for the next CLI release. I'm therefore closing the issue. Please report back if the issue still persists.

This is actually working if deployed on graphcool but when deploying on the local environment the error persists (even with the last image with gc local pull) but it's ok for local development just have to wait few days

EDIT:

My bad, after restarting the docker container it works perferctly, so the gc local pull did fix the problem

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dohomi picture dohomi  Â·  3Comments

jannone picture jannone  Â·  3Comments

marktani picture marktani  Â·  3Comments

hoodsy picture hoodsy  Â·  3Comments

AlessandroAnnini picture AlessandroAnnini  Â·  3Comments