mwickett
07/13/2017, 4:52 PMrajit
07/13/2017, 5:35 PMpost
with a one-to-many relation to comment
. You want to add one comment. If I use the createComment
mutation it creates the comment but doesn’t associate it with the post
until I update the post as well. Is there a nifty way to do this with nested mutations?rajit
07/13/2017, 5:38 PMupdatePost(id: $postId, comments: [{ author: $author, content: $content }]) {
...
}
The error is The field 'post' on type 'Comment' is required. Performing this mutation would violate the constraint
jony
07/13/2017, 6:18 PMjony
07/13/2017, 6:18 PMjony
07/13/2017, 6:19 PMjony
07/13/2017, 6:20 PMjony
07/13/2017, 6:20 PMcj
07/13/2017, 6:37 PMjbaudin
07/13/2017, 6:49 PMcj
07/13/2017, 6:49 PMcj
07/13/2017, 6:50 PMjbaudin
07/13/2017, 6:52 PMjbaudin
07/13/2017, 6:52 PMmwickett
07/13/2017, 6:54 PMjbaudin
07/13/2017, 6:54 PMjbaudin
07/13/2017, 6:54 PMcj
07/13/2017, 6:54 PMcj
07/13/2017, 6:54 PMcj
07/13/2017, 6:55 PMjbaudin
07/13/2017, 6:55 PMjbaudin
07/13/2017, 6:56 PMjbaudin
07/13/2017, 6:56 PMjbaudin
07/13/2017, 6:57 PMcj
07/13/2017, 6:58 PMjbaudin
07/13/2017, 6:59 PMcj
07/13/2017, 6:59 PMjbaudin
07/13/2017, 6:59 PMjbaudin
07/13/2017, 7:00 PMcj
07/13/2017, 7:00 PM