Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullable property-constraint ignored #48

Open
tlenexkoyotl opened this issue Apr 7, 2020 · 0 comments
Open

Nullable property-constraint ignored #48

tlenexkoyotl opened this issue Apr 7, 2020 · 0 comments

Comments

@tlenexkoyotl
Copy link

Hi!
I set up an example Grails Application project following this guide, however when setting the firstName property as not nullable this constraint is not respected, GraphiQL displays it as a nullable field in the SpeakerCreate type.

static constraints = {
  firstName nullable: false
  email nullable: true, email: true
  bio nullable: true
}

static graphql = GraphQLMapping.build {
  property('firstName',
    [
      order      : 2,
      description: 'Author first name'
      nullable: false'
    ])
}

image

Only if I remove the entire property mapping is the nullable constraint respected, but this prevents me from mapping the property with a custom order and description.

static constraints = {
  firstName nullable: false
  email nullable: true, email: true
  bio nullable: true
}

static graphql = GraphQLMapping.build {
  /*property('firstName',
    [
      order      : 2,
      description: 'Author first name'
      nullable: false'
    ])*/
}

image

Thanks in advance

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

No branches or pull requests

1 participant