@simpleview/sv-auth-client 5.0.4 → 5.0.5
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 +1 -1
- package/src/prefixes/AuthPrefix.js +24 -0
package/package.json
CHANGED
|
@@ -359,6 +359,30 @@ class AuthPrefix {
|
|
|
359
359
|
return result.auth.send_email_mfa_code;
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
+
async root_user({ fields, context }) {
|
|
363
|
+
context = context || this._graphServer.context;
|
|
364
|
+
|
|
365
|
+
const result = await query({
|
|
366
|
+
query: `
|
|
367
|
+
query {
|
|
368
|
+
auth {
|
|
369
|
+
root_user {
|
|
370
|
+
${fields}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
`,
|
|
375
|
+
url: this._graphUrl,
|
|
376
|
+
token: context.token
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
const returnData = result.auth.root_user;
|
|
380
|
+
|
|
381
|
+
nullToUndefined(returnData)
|
|
382
|
+
|
|
383
|
+
return returnData;
|
|
384
|
+
}
|
|
385
|
+
|
|
362
386
|
async update_root_user({ input, fields, context}) {
|
|
363
387
|
context = context || this._graphServer.context;
|
|
364
388
|
|