tlenexkoyotl opened a new issue, #14514:
URL: https://github.com/apache/grails-core/issues/14514

   Hi!
   I set up an example Grails Application project following [this 
guide](https://grails.github.io/gorm-graphql/2.0.0/guide/index.html), 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.
   
   ```groovy
   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](https://user-images.githubusercontent.com/42621479/78719243-3f200e80-78e9-11ea-8439-30d0e006bbd4.png)
   
   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.
   
   ```groovy
   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](https://user-images.githubusercontent.com/42621479/78720050-9d012600-78ea-11ea-8496-b57485691acb.png)
   
   
   Thanks in advance


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to