Feature flags seeds, queries and hooks (#2769)
* seed is working * allow graphql to retrieve feature flag data * create useIsFeatureEnabled hook * hook is working * Update icons.ts
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Field, ID, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { IDField } from '@ptc-org/nestjs-query-graphql';
|
||||
import { IDField, UnPagedRelation } from '@ptc-org/nestjs-query-graphql';
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
@@ -15,6 +15,7 @@ import { FeatureFlagEntity } from 'src/core/feature-flag/feature-flag.entity';
|
||||
|
||||
@Entity({ name: 'workspace', schema: 'core' })
|
||||
@ObjectType('Workspace')
|
||||
@UnPagedRelation('featureFlags', () => FeatureFlagEntity, { nullable: true })
|
||||
export class Workspace {
|
||||
@IDField(() => ID)
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
|
||||
@@ -7,6 +7,7 @@ import { FileModule } from 'src/core/file/file.module';
|
||||
import { WorkspaceManagerModule } from 'src/workspace/workspace-manager/workspace-manager.module';
|
||||
import { WorkspaceResolver } from 'src/core/workspace/workspace.resolver';
|
||||
import { TypeORMModule } from 'src/database/typeorm/typeorm.module';
|
||||
import { FeatureFlagEntity } from 'src/core/feature-flag/feature-flag.entity';
|
||||
|
||||
import { Workspace } from './workspace.entity';
|
||||
import { workspaceAutoResolverOpts } from './workspace.auto-resolver-opts';
|
||||
@@ -18,7 +19,10 @@ import { WorkspaceService } from './services/workspace.service';
|
||||
TypeORMModule,
|
||||
NestjsQueryGraphQLModule.forFeature({
|
||||
imports: [
|
||||
NestjsQueryTypeOrmModule.forFeature([Workspace], 'core'),
|
||||
NestjsQueryTypeOrmModule.forFeature(
|
||||
[Workspace, FeatureFlagEntity],
|
||||
'core',
|
||||
),
|
||||
WorkspaceManagerModule,
|
||||
FileModule,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user