Jean-Sébastien Herbaux 5a7a5dc987
[V4] GraphQL - Migrate Users & Permissions GraphQL config to V4 (#10979)
* Migrate UsersPermissions's GQL configuration to V4

* Remove old graphql configuration
2021-09-15 15:44:42 +02:00

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;
},
});