Remove hasura and hasura-auth (#134)
* Remove hasura and hasura-auth * Move all models to prisma * Start implementing graphql * chore: clean package json * chore: make the code build * chore: get initial graphql.tsx file * feature: use typegql as qgl server * refactor: small refactoring * refactor: clean tests * bugfix: make all filters not case sensitive * chore: remove unused imports --------- Co-authored-by: Sammy Teillet <sammy.teillet@gmail.com>
This commit is contained in:
19
server/src/entities/workspace/workspace.repository.ts
Normal file
19
server/src/entities/workspace/workspace.repository.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Workspace, Prisma } from '@prisma/client';
|
||||
import { PrismaService } from 'src/database/prisma.service';
|
||||
|
||||
@Injectable()
|
||||
export class WorkspaceRepository {
|
||||
constructor(private prisma: PrismaService) {}
|
||||
|
||||
async findMany(params: {
|
||||
skip?: number;
|
||||
take?: number;
|
||||
cursor?: Prisma.WorkspaceWhereUniqueInput;
|
||||
where?: Prisma.WorkspaceWhereInput;
|
||||
orderBy?: Prisma.WorkspaceOrderByWithRelationInput;
|
||||
}): Promise<Workspace[]> {
|
||||
const { skip, take, cursor, where, orderBy } = params;
|
||||
return this.prisma.workspace.findMany({ skip, take, cursor, where, orderBy });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user