Matt Rider 29f39c4f45 Update backend tests
- Every test that created or updated a post needed to be updated to add categoryIds
2019-08-20 15:54:51 +02:00

22 lines
581 B
JavaScript

import uuid from 'uuid/v4'
module.exports = {
id: { type: 'string', primary: true, default: uuid },
name: { type: 'string', required: true, default: false },
slug: { type: 'string' },
icon: { type: 'string', required: true, default: false },
createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() },
updatedAt: {
type: 'string',
isoDate: true,
required: true,
default: () => new Date().toISOString(),
},
post: {
type: 'relationship',
relationship: 'CATEGORIZED',
target: 'Post',
direction: 'in',
},
}