Add comments to Prisma Schema and GraphQL server (#162)

* Lowercase all relations in prisma/graphql schema

* Add Comments data model and graphql schema

* Make comments availalble on the api through resolvers and guard them

* Update front graphql schema

* Fix PR
This commit is contained in:
Charles Bochet
2023-05-31 15:41:53 +02:00
committed by GitHub
parent 8bd91139ca
commit a3a3c1924f
311 changed files with 8480 additions and 202 deletions

View File

@ -0,0 +1,53 @@
import { PrismaClient } from '@prisma/client';
export const seedUsers = async (prisma: PrismaClient) => {
await prisma.user.upsert({
where: { id: 'twenty-ge256b39-3ec3-4fe3-8997-b76aa0bfa408' },
update: {},
create: {
id: 'twenty-ge256b39-3ec3-4fe3-8997-b76aa0bfa408',
displayName: 'Charles Bochet',
email: 'charles@test.com',
locale: 'en',
workspaceMember: {
create: {
id: 'twenty-7ef9d213-1c25-4d02-bf35-6aeccf7ea419',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
},
},
},
});
await prisma.user.upsert({
where: { id: 'twenty-gk256b39-3ec3-4fe3-8997-b76aa0bfa408' },
update: {},
create: {
id: 'twenty-gk256b39-3ec3-4fe3-8997-b76aa0bfa408',
displayName: 'Félix Malfait',
email: 'felix@test.com',
locale: 'en',
workspaceMember: {
create: {
id: 'twenty-7ed9d213-1c25-4d02-bf35-6aeccf7ea419',
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
},
},
},
});
await prisma.user.upsert({
where: { id: 'twenty-dev-gk256b39-3ec3-4fe3-8997-b76aa0boa408' },
update: {},
create: {
id: 'twenty-dev-gk256b39-3ec3-4fe3-8997-b76aa0boa408',
displayName: 'Charles Bochet Dev',
email: 'charles-dev@test.com',
locale: 'en',
workspaceMember: {
create: {
id: 'twenty-dev-7ed9d213-1c25-4d02-bf35-6aeccf7oa419',
workspaceId: 'twenty-dev-7ed9d212-1c25-4d02-bf25-6aeccf7ea420',
},
},
},
});
};