Password field required but empty string is considered valid



My user type must have a name and password:

type User @model {
	id: ID! @isUnique
	email: String! @isUnique
	password: String!
    name: String!

However if I pass an empty string the user is still created:

mutation {
  createUser (email: "", password: "", name: ""){

Is this a bug? I couldn’t see a way in the docs to set a minimum length on string, but doesn’t this make the required parameter almost pointless?


It’s because String! means that null is not allowed.
An empty string is still a value.

A directive to be able to specify min length for instance, is under consideration.


Thanks, hope this feature makes it in.