#NEWLINE# def get_query( model , info ) : #NEWLINE# #INDENT# query = getattr ( model , 'query' , None ) #NEWLINE# if ( not query ) : #NEWLINE# #INDENT# session = get_session ( info ) #NEWLINE# if ( not session ) : #NEWLINE# #INDENT# raise Exception ( 'A query in the model Base or a session in the schema is required for querying.\nRead more http://graphene-python.org/docs/sqlalchemy/tips/#querying' ) #NEWLINE# #UNINDENT# query = session . query ( model ) #NEWLINE# #UNINDENT# return query