mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-11-04 01:47:45 +03:00 
			
		
		
		
	Removed unnecessary get_global_schema legacy code
This commit is contained in:
		
							parent
							
								
									0aba625140
								
							
						
					
					
						commit
						587f05e1d7
					
				| 
						 | 
					@ -5,7 +5,6 @@ from graphene import relay
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from graphene.core.fields import Field, LazyField
 | 
					from graphene.core.fields import Field, LazyField
 | 
				
			||||||
from graphene.utils import cached_property, memoize
 | 
					from graphene.utils import cached_property, memoize
 | 
				
			||||||
from graphene.env import get_global_schema
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
from graphene.relay.types import BaseNode
 | 
					from graphene.relay.types import BaseNode
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,7 +13,7 @@ from django.db.models.manager import Manager
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def get_type_for_model(schema, model):
 | 
					def get_type_for_model(schema, model):
 | 
				
			||||||
    schema = schema or get_global_schema()
 | 
					    schema = schema
 | 
				
			||||||
    types = schema.types.values()
 | 
					    types = schema.types.values()
 | 
				
			||||||
    for _type in types:
 | 
					    for _type in types:
 | 
				
			||||||
        type_model = hasattr(_type,'_meta') and getattr(_type._meta, 'model', None)
 | 
					        type_model = hasattr(_type,'_meta') and getattr(_type._meta, 'model', None)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@ from graphql_relay.connection.connection import (
 | 
				
			||||||
    connectionDefinitions
 | 
					    connectionDefinitions
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from graphene.env import get_global_schema
 | 
					 | 
				
			||||||
from graphene.core.types import Interface
 | 
					from graphene.core.types import Interface
 | 
				
			||||||
from graphene.core.fields import LazyNativeField
 | 
					from graphene.core.fields import LazyNativeField
 | 
				
			||||||
from graphene.utils import memoize
 | 
					from graphene.utils import memoize
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user