We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Resource.tools
1 parent c84e94a commit f7f2839Copy full SHA for f7f2839
src/components/tools/tool-usage/dto/tool-usage.dto.ts
@@ -1,4 +1,5 @@
1
import { Field, ObjectType } from '@nestjs/graphql';
2
+import { patchMethod } from '@seedcompany/common';
3
import {
4
Resource,
5
type Secured,
@@ -37,3 +38,13 @@ declare module '~/core/resources/map' {
37
38
ToolUsage: typeof e.Tool.Usage;
39
}
40
41
+
42
+declare module '~/common/resource.dto' {
43
+ export interface DeclareResourceRelations {
44
+ readonly tools: readonly [typeof ToolUsage];
45
+ }
46
+}
47
+patchMethod(Resource, 'Relations', (orig) => () => ({
48
+ ...orig(),
49
+ tools: [ToolUsage] as const,
50
+}));
0 commit comments