Skip to content

Nullable property-constraint ignored #14514

Open
@tlenexkoyotl

Description

@tlenexkoyotl

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions