@things-factory/menu-base 8.0.0-alpha.32 → 8.0.0-alpha.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/menu-base",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.33",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@things-factory/auth-base": "^8.0.0-alpha.29"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "63554d4eb949ba731c493684e643bd9eac40f3e9"
|
|
30
30
|
}
|
|
@@ -227,6 +227,11 @@ export class MenuQuery {
|
|
|
227
227
|
})
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
+
@FieldResolver(type => Role)
|
|
231
|
+
async role(@Root() menu: Menu) {
|
|
232
|
+
return menu.roleId && (await getRepository(Role).findOneBy({ id: menu.roleId }))
|
|
233
|
+
}
|
|
234
|
+
|
|
230
235
|
@FieldResolver(type => Domain)
|
|
231
236
|
async domain(@Root() menu: Menu): Promise<Domain> {
|
|
232
237
|
return await getRepository(Domain).findOneBy({ id: menu.domainId })
|