Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Improve "Please supply a valid model. Reason: No model with name: User found." #829

Closed
marktani opened this issue Oct 15, 2017 · 1 comment
Milestone

Comments

@marktani
Copy link
Contributor

types.graphql:

type Subscriber @model {
  id: ID! @isUnique
  name: String!
}

graphcool.yml:

types: ./types.graphql

functions:
  validateEmail:
    type: operationBefore
    operation: User.create
    handler:
      code: src/validateEmail.js

Deploying returns the error message

Please supply a valid model. Reason: No model with name: User found.

The error message should include the function name and type, something like this:

Error in operationBefore function 'validate Email': No model with name 'User' found. Please supply a valid model.

@marktani
Copy link
Contributor Author

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant