mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +00:00 
			
		
		
		
	add graphql query for the current user
This commit is contained in:
		
							parent
							
								
									53391a5096
								
							
						
					
					
						commit
						df9f6d6aee
					
				@ -2,8 +2,18 @@ module.exports = {
 | 
			
		||||
  type: {
 | 
			
		||||
    UsersPermissionsPermission: false // Make this type NOT queriable.
 | 
			
		||||
  },  
 | 
			
		||||
  query: `
 | 
			
		||||
    me: UsersPermissionsUser
 | 
			
		||||
  `,
 | 
			
		||||
  resolver: {
 | 
			
		||||
    Query: {
 | 
			
		||||
      me: {
 | 
			
		||||
        resolverOf: 'User.me',
 | 
			
		||||
        resolver: {
 | 
			
		||||
          plugin: 'users-permissions',
 | 
			
		||||
          handler: 'User.me'
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      role: {
 | 
			
		||||
        resolverOf: 'UsersPermissions.getRole',
 | 
			
		||||
        resolver: async (obj, options, ctx) => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user