Matt Rider 5e592f666b Write unit test badge creation
- for unauthenticated
- for authenticated admin

Co-authored-by: Wolfgang Huss <wolle.huss@pjannto.com>
2019-02-28 16:16:14 -03:00

24 lines
347 B
JavaScript

import uuid from 'uuid/v4'
export default function (params) {
const {
id = uuid(),
key,
type = 'crowdfunding',
status = 'permanent',
icon
} = params
return `
mutation {
CreateBadge(
id: "${id}",
key: "${key}",
type: ${type},
status: ${status},
icon: "${icon}"
) { id }
}
`
}