6129444c5c
* Wip * WIP * Removed concole log * Add relations to workspace init (#2511) * Add relations to workspace init * remove logs * update prefill * add missing isSystem * comment relation fields * Migrate v2 core models to graphql schema (#2509) * migrate v2 core models to graphql schema * Migrate to new workspace member schema * Continue work * migrated-main * Finished accountOwner nested field integration on companies * Introduce bug * Fix --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com> Co-authored-by: Weiko <corentin@twenty.com>
39 lines
841 B
TypeScript
39 lines
841 B
TypeScript
import {
|
|
AutoResolverOpts,
|
|
ReadResolverOpts,
|
|
PagingStrategies,
|
|
} from '@ptc-org/nestjs-query-graphql';
|
|
|
|
import { UserV2 } from 'src/coreV2/user/user.entity';
|
|
import { JwtAuthGuard } from 'src/guards/jwt.auth.guard';
|
|
|
|
export const userAutoResolverOpts: AutoResolverOpts<
|
|
any,
|
|
any,
|
|
unknown,
|
|
unknown,
|
|
ReadResolverOpts<any>,
|
|
PagingStrategies
|
|
>[] = [
|
|
{
|
|
EntityClass: UserV2,
|
|
DTOClass: UserV2,
|
|
enableTotalCount: true,
|
|
pagingStrategy: PagingStrategies.CURSOR,
|
|
read: {
|
|
many: { disabled: true },
|
|
one: { disabled: true },
|
|
},
|
|
create: {
|
|
many: { disabled: true },
|
|
one: { disabled: true },
|
|
},
|
|
update: {
|
|
many: { disabled: true },
|
|
one: { disabled: true },
|
|
},
|
|
delete: { many: { disabled: true }, one: { disabled: true } },
|
|
guards: [JwtAuthGuard],
|
|
},
|
|
];
|