regarding the basic graphcool API example with Pos...
# prisma-whats-new
c
regarding the basic graphcool API example with Post and Comment: How do I create a batch of new Comment connected to a single Post?
mutation { updatePost( id: "POST_ID", comments: [{ text: "new comment" }] ) { id } }
this gives me the error message "The field 'post' on type 'Comment' is required. Performing this mutation would violate the constraint"
Another way would be to do a createPost mutation for each Comment, increasing the query amount...
r
That can be done as -
Copy code
mutation {
	updatePost(where: {
		id: "POST_ID"
	}, data: {
		comments: {
			create: [
				{
					text: "Comment 1"
				},
				{
					text: "Comment 2"
				},
				...
				...
			]
		}
	}) {
		id
		comments {
			text
		}
	}
}
c
sorry, I believe your suggestion is using the Prisma syntax, whereas I am looking for help for the graphcool framework