File tree Expand file tree Collapse file tree 3 files changed +29
-5
lines changed Expand file tree Collapse file tree 3 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 1
1
import { ObjectType } from '@nestjs/graphql' ;
2
2
import { keys as keysOf } from 'ts-transformer-keys' ;
3
3
import { SecuredProps } from '~/common' ;
4
- import { LinkTo } from '~/core/resources' ;
4
+ import { e } from '~/core/edgedb' ;
5
+ import { LinkTo , RegisterResource } from '~/core/resources' ;
5
6
import { Notification } from '../../notifications' ;
6
7
8
+ @RegisterResource ( { db : e . Notification . CommentViaMention } )
7
9
@ObjectType ( {
8
10
implements : [ Notification ] ,
9
11
} )
@@ -14,3 +16,12 @@ export class CommentViaMentionNotification extends Notification {
14
16
15
17
readonly comment : LinkTo < 'Comment' > ;
16
18
}
19
+
20
+ declare module '~/core/resources/map' {
21
+ interface ResourceMap {
22
+ CommentMentionedNotification : typeof CommentViaMentionNotification ;
23
+ }
24
+ interface ResourceDBMap {
25
+ CommentMentionedNotification : typeof e . Notification . CommentViaMention ;
26
+ }
27
+ }
Original file line number Diff line number Diff line change @@ -2,8 +2,11 @@ import { Field, ObjectType } from '@nestjs/graphql';
2
2
import { keys as keysOf } from 'ts-transformer-keys' ;
3
3
import { SecuredProps } from '~/common' ;
4
4
import { MarkdownScalar } from '~/common/markdown.scalar' ;
5
+ import { RegisterResource } from '~/core' ;
6
+ import { e } from '~/core/edgedb' ;
5
7
import { Notification } from '../notifications' ;
6
8
9
+ @RegisterResource ( { db : e . Notification . System } )
7
10
@ObjectType ( {
8
11
implements : [ Notification ] ,
9
12
} )
@@ -14,3 +17,12 @@ export class SystemNotification extends Notification {
14
17
@Field ( ( ) => MarkdownScalar )
15
18
readonly message : string ;
16
19
}
20
+
21
+ declare module '~/core/resources/map' {
22
+ interface ResourceMap {
23
+ SystemNotification : typeof SystemNotification ;
24
+ }
25
+ interface ResourceDBMap {
26
+ SystemNotification : typeof e . Notification . System ;
27
+ }
28
+ }
Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ import { Field, InterfaceType } from '@nestjs/graphql';
2
2
import { DateTime } from 'luxon' ;
3
3
import { keys as keysOf } from 'ts-transformer-keys' ;
4
4
import { DateTimeField , Resource , SecuredProps } from '~/common' ;
5
+ import { e } from '~/core/edgedb' ;
5
6
import { RegisterResource } from '~/core/resources' ;
6
7
7
- @RegisterResource ( )
8
+ @RegisterResource ( { db : e . default . Notification } )
8
9
@InterfaceType ( {
9
10
implements : [ Resource ] ,
10
11
} )
@@ -28,7 +29,7 @@ declare module '~/core/resources/map' {
28
29
interface ResourceMap {
29
30
Notification : typeof Notification ;
30
31
}
31
- // interface ResourceDBMap {
32
- // Notification: typeof e.Notification;
33
- // }
32
+ interface ResourceDBMap {
33
+ Notification : typeof e . default . Notification ;
34
+ }
34
35
}
You can’t perform that action at this time.
0 commit comments