[QUESTION] Create record and relation with related entity with single mutation (Many to Many) #1508
              
                Unanswered
              
          
                  
                    
                      pratiksyngenta
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Setup:
NestJs
TypeOrm
Nestjs-Query
PostgreSQL
I understand, when specifying a @OffsetConnection relation a couple of endpoints will automatically be generated. In this example the following are generated.
ie. => addSubTasksToTodoItem - A mutation to add SubTasks to a TodoItem
How can I create record and relation with related entity with single mutation (Many to Many relationship)?
I was thinking of using hooks, but I think all of the hooks are all @ Before[operation] so it would not help [as id would be generated after insert which we need to create relation entry]
Beta Was this translation helpful? Give feedback.
All reactions