graphql-constraint-directive
Version:
Validate GraphQL fields
15 lines (12 loc) • 376 B
JavaScript
module.exports = class ConstraintDirectiveError extends Error {
;
constructor (fieldName, message, context) {
super(message)
this.name = this.constructor.name
Error.captureStackTrace(this, this.constructor)
this.code = 'ERR_GRAPHQL_CONSTRAINT_VALIDATION'
this.fieldName = fieldName
this.context = context
this.originalError = undefined
}
}