def extract_field_name(field):
    """ Pre-processes 'field' from URL query params. Solely handles converting 'type' to '@type' and
        discarding the not (!) qualifier.

    :param field: field name to process
    :return: correct field_name to search on
    """
    use_field = '@type' if field == 'type' else field  # 'type' field is really '@type' in the schema
    return use_field[:-1] if use_field.endswith('!') else use_field