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

   I want  to  create mutation with domain class talk ,how to write the 
document?
   
   ```
   @GrailsCompileStatic
   class Speaker {
       String firstName
       String lastName
       String name
       String email
       String bio
       static hasMany = [talks: Talk]
       static graphql = true 
       static constraints = {
           email nullable: true, email: true
           bio nullable: true
       }
       static mapping = {
           bio type: 'text'
           name formula: 'concat(FIRST_NAME,\' \',LAST_NAME)'
           talks sort: 'id'
       }
   }
   
   @GrailsCompileStatic
   class Talk {
       Speaker speaker
       String title
       int duration
       static graphql = true 
       static belongsTo = [speaker: Speaker]
   }
   ```
   
   if i use the code like this:
   ```
   mutation {
     talkCreate(talk: {
       title: "about K8S"
       duration: 120
       speaker: {
           id: 1
       }
     }) {
       id
       title
       duration
       speaker {
           id
       }
       errors {
         field
         message
       }
     }
   }
   ```
   
   the speaker_id always set null, why?


-- 
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