mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-11-04 18:08:01 +03:00 
			
		
		
		
	Improve ErrorType
Marks some fields as required and non null, it also prevents to do useless checks on the frontend if using a typed language.
This commit is contained in:
		
							parent
							
								
									53546a27de
								
							
						
					
					
						commit
						6a152820ca
					
				| 
						 | 
				
			
			@ -3,8 +3,8 @@ from graphene.types.unmountedtype import UnmountedType
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
class ErrorType(graphene.ObjectType):
 | 
			
		||||
    field = graphene.String()
 | 
			
		||||
    messages = graphene.List(graphene.String)
 | 
			
		||||
    field = graphene.String(required=True)
 | 
			
		||||
    messages = graphene.List(graphene.NonNull(graphene.String), required=True)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class DictType(UnmountedType):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user