mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-11-04 18:07:48 +03:00 
			
		
		
		
	Improved mutation class
This commit is contained in:
		
							parent
							
								
									858343a8f6
								
							
						
					
					
						commit
						3604c8f172
					
				| 
						 | 
				
			
			@ -41,8 +41,10 @@ class Mutation(ObjectType):
 | 
			
		|||
            else:
 | 
			
		||||
                arguments = {}
 | 
			
		||||
 | 
			
		||||
        resolver = resolver or get_unbound_function(getattr(cls, 'mutate', None))
 | 
			
		||||
        assert resolver, 'All mutations must define a mutate method in it'
 | 
			
		||||
        if not resolver:
 | 
			
		||||
            mutate = getattr(cls, 'mutate', None)
 | 
			
		||||
            assert mutate, 'All mutations must define a mutate method in it'
 | 
			
		||||
            resolver = get_unbound_function(mutate)
 | 
			
		||||
 | 
			
		||||
        _meta.fields = fields
 | 
			
		||||
        _meta.output = output
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user