mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-20 20:01:22 +00:00
24 lines
406 B
JavaScript
24 lines
406 B
JavaScript
import faker from 'faker'
|
|
import uuid from 'uuid/v4'
|
|
|
|
export default function (params) {
|
|
const {
|
|
id = uuid(),
|
|
postId = uuid(),
|
|
content = [
|
|
faker.lorem.sentence(),
|
|
faker.lorem.sentence()
|
|
].join('. ')
|
|
} = params
|
|
|
|
return `
|
|
mutation {
|
|
CreateComment(
|
|
id: "${id}",
|
|
postId: "${postId}",
|
|
content: "${content}"
|
|
) { id, content }
|
|
}
|
|
`
|
|
}
|