def field_definition(resource, chained_fields):
 definition = config.DOMAIN[resource]
 subfields = chained_fields.split('.')
 for field in subfields:
  if (field not in definition.get('schema', {})):
   if ('data_relation' in definition):
    sub_resource = definition['data_relation']['resource']
    definition = config.DOMAIN[sub_resource]
  if (field not in definition['schema']):
   return
  definition = definition['schema'][field]
  field_type = definition.get('type')
  if (field_type == 'list'):
   definition = definition['schema']
  elif (field_type == 'objectid'):
   pass
 return definition

def field_definition ( resource , chained_fields ) : definition = config . DOMAIN [ resource ] subfields = chained_fields . split ( '.' ) for field in subfields : if ( field not in definition . get ( 'schema' , { } ) ) : if ( 'data_relation' in definition ) : sub_resource = definition [ 'data_relation' ] [ 'resource' ] definition = config . DOMAIN [ sub_resource ] if ( field not in definition [ 'schema' ] ) : return definition = definition [ 'schema' ] [ field ] field_type = definition . get ( 'type' ) if ( field_type == 'list' ) : definition = definition [ 'schema' ] elif ( field_type == 'objectid' ) : pass return definition
resolves query string to resource with dot notation like people .