mirror of
https://github.com/strapi/strapi.git
synced 2025-07-10 10:33:53 +00:00
18 lines
258 B
JavaScript
18 lines
258 B
JavaScript
![]() |
'use strict';
|
||
|
|
||
|
module.exports = () => ({
|
||
|
type: 'UsersPermissionsMe',
|
||
|
|
||
|
args: {},
|
||
|
|
||
|
resolve(parent, args, context) {
|
||
|
const { user } = context.state;
|
||
|
|
||
|
if (!user) {
|
||
|
throw new Error('Authentication requested');
|
||
|
}
|
||
|
|
||
|
return user;
|
||
|
},
|
||
|
});
|