mirror of
https://github.com/strapi/strapi.git
synced 2025-07-09 18:13:00 +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;
|
|
},
|
|
});
|